diff options
author | dtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-09 20:29:33 +0000 |
---|---|---|
committer | dtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-09 20:29:33 +0000 |
commit | 698b41f988a4ee1eae39255009e7e231e9b40b44 (patch) | |
tree | f8cd4aca9ec0aae232dc3cc2c2c90033220e03d8 /extensions | |
parent | 2a33d152bb7e8d8174e2645fb26e847e272c3336 (diff) | |
download | chromium_src-698b41f988a4ee1eae39255009e7e231e9b40b44.zip chromium_src-698b41f988a4ee1eae39255009e7e231e9b40b44.tar.gz chromium_src-698b41f988a4ee1eae39255009e7e231e9b40b44.tar.bz2 |
Support global keyboard commands on Chrome OS.
Currently, AcceleratorController delivers accelerators to GlobalCommandsListenerChromeOS (which is an AcceleratorTarget). We respect the same conditions found within AcceleratorController to disallow shortcuts in specific instances (e.g. login screen locked screen, empty windows). AcceleratorController is owned by the ash::Shell and knows about existing keyboard shortcuts/actions.
BUG=336761
TEST=interactive_ui_tests --gtest_filter=GlobalCommandsApiTest.*
And, manually, on a desktop build of Chrome with GYP_DEFINES=chromeos=1...
with a component extension:
Verified that
- a global shortcut (ctrl+shift+0) works with focus in
1. web content
2. shelf
3. toolbars (omni box, View(s)).
Verified that processing does not occur in the following cases (similarly to most other ash accelerators) as expected:
- OOBE
- locked screen
- desktop with no windows open
- sign in screen (after logging out).
Review URL: https://codereview.chromium.org/350943003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282110 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/common/feature_switch.cc | 11 | ||||
-rw-r--r-- | extensions/common/feature_switch.h | 1 | ||||
-rw-r--r-- | extensions/common/switches.cc | 3 | ||||
-rw-r--r-- | extensions/common/switches.h | 1 |
4 files changed, 0 insertions, 16 deletions
diff --git a/extensions/common/feature_switch.cc b/extensions/common/feature_switch.cc index 01d0ca2..a68ecd7 100644 --- a/extensions/common/feature_switch.cc +++ b/extensions/common/feature_switch.cc @@ -23,13 +23,6 @@ class CommonSwitches { force_dev_mode_highlighting( switches::kForceDevModeHighlighting, FeatureSwitch::DEFAULT_DISABLED), - global_commands( - switches::kGlobalCommands, -#if defined(OS_CHROMEOS) - FeatureSwitch::DEFAULT_DISABLED), -#else - FeatureSwitch::DEFAULT_ENABLED), -#endif prompt_for_external_extensions( NULL, #if defined(OS_WIN) @@ -57,7 +50,6 @@ class CommonSwitches { FeatureSwitch easy_off_store_install; FeatureSwitch force_dev_mode_highlighting; - FeatureSwitch global_commands; // Should we prompt the user before allowing external extensions to install? // Default is yes. @@ -81,9 +73,6 @@ FeatureSwitch* FeatureSwitch::force_dev_mode_highlighting() { FeatureSwitch* FeatureSwitch::easy_off_store_install() { return &g_common_switches.Get().easy_off_store_install; } -FeatureSwitch* FeatureSwitch::global_commands() { - return &g_common_switches.Get().global_commands; -} FeatureSwitch* FeatureSwitch::prompt_for_external_extensions() { return &g_common_switches.Get().prompt_for_external_extensions; } diff --git a/extensions/common/feature_switch.h b/extensions/common/feature_switch.h index 01d9589..b84b0da 100644 --- a/extensions/common/feature_switch.h +++ b/extensions/common/feature_switch.h @@ -21,7 +21,6 @@ class FeatureSwitch { public: static FeatureSwitch* easy_off_store_install(); static FeatureSwitch* force_dev_mode_highlighting(); - static FeatureSwitch* global_commands(); static FeatureSwitch* prompt_for_external_extensions(); static FeatureSwitch* error_console(); static FeatureSwitch* enable_override_bookmarks_ui(); diff --git a/extensions/common/switches.cc b/extensions/common/switches.cc index f4e6946..9b17ad2 100644 --- a/extensions/common/switches.cc +++ b/extensions/common/switches.cc @@ -58,9 +58,6 @@ const char kExtensionsOnChromeURLs[] = "extensions-on-chrome-urls"; // Whether to force developer mode extensions highlighting. const char kForceDevModeHighlighting[] = "force-dev-mode-highlighting"; -// Enables setting global commands through the Extensions Commands API. -const char kGlobalCommands[] = "global-commands"; - // Notify the user and require consent for extensions running scripts. // Appending --scripts-require-action=1 has the same effect as // --enable-scripts-require-action (see below). diff --git a/extensions/common/switches.h b/extensions/common/switches.h index f173a18..475650f 100644 --- a/extensions/common/switches.h +++ b/extensions/common/switches.h @@ -24,7 +24,6 @@ extern const char kExtensionActionRedesign[]; extern const char kExtensionProcess[]; extern const char kExtensionsOnChromeURLs[]; extern const char kForceDevModeHighlighting[]; -extern const char kGlobalCommands[]; extern const char kScriptsRequireAction[]; extern const char kEnableScriptsRequireAction[]; extern const char kShowComponentExtensionOptions[]; |