Bug 1842773 - Part 5: Add ArrayBuffer.prototype.{maxByteLength,resizable} getters...
[gecko.git] / dom / base / nsGlobalWindowCommands.h
blob07a26e1eb4ad0cd0dc2640d03581667ba0e850d0
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsGlobalWindowCommands_h__
8 #define nsGlobalWindowCommands_h__
10 #include "nscore.h"
12 namespace mozilla::layers {
13 struct KeyboardScrollAction;
14 } // namespace mozilla::layers
16 class nsControllerCommandTable;
18 class nsWindowCommandRegistration {
19 public:
20 static nsresult RegisterWindowCommands(
21 nsControllerCommandTable* aCommandTable);
24 class nsGlobalWindowCommands {
25 public:
26 using KeyboardScrollAction = mozilla::layers::KeyboardScrollAction;
28 /**
29 * Search through nsGlobalWindowCommands to find the keyboard scrolling action
30 * that would be done in response to a command.
32 * @param aCommandName the name of the command
33 * @param aOutAction the result of searching for this command, must not be
34 * null
35 * @returns whether a keyboard action was found or not
37 static bool FindScrollCommand(const char* aCommandName,
38 KeyboardScrollAction* aOutAction);
41 #endif // nsGlobalWindowCommands_h__