summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-23 13:00:55 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-23 13:00:55 +0000
commitf553247ebf96528afde64b205cc4fb8733fb08ce (patch)
tree025fa9618eb4bec03f93e58a35fbf2b97dfa5a76 /ash
parent92e713a7e3b2b5a2458876f81a053d0c6b7ce5fd (diff)
downloadchromium_src-f553247ebf96528afde64b205cc4fb8733fb08ce.zip
chromium_src-f553247ebf96528afde64b205cc4fb8733fb08ce.tar.gz
chromium_src-f553247ebf96528afde64b205cc4fb8733fb08ce.tar.bz2
Experimental Extension Keybinding (first cut).
Implemented in this cut: - End-to-end extension keybinding -- in one dimension, that is -- no UI, just basic functionality, such as: - Manifest changes to specify keybinding. - A simple parser to parse the keybinding from the manifest. - An Extension Keybinding Registry object. - The ability to open browser action popups, page action popups and send named events to the Extension. Not implemented: - All non-Windows specific code. - Install-success-bubble UI changes (that notify the user of new keybinding -- or of keybinding conflict) - A UI to show all keybindings and keybinding conflicts, allowing user to reconfigure keybindings. BUG=27702 TEST=This is tested by an automated test and requires an extension to test manually (one that registers keybinding shortcuts). Review URL: https://chromiumcodereview.appspot.com/9402018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123228 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/accelerators/accelerator_controller.cc6
-rw-r--r--ash/focus_cycler.cc8
2 files changed, 10 insertions, 4 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 366008e..1a9e54a 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -276,7 +276,9 @@ void AcceleratorController::Init() {
void AcceleratorController::Register(const ui::Accelerator& accelerator,
ui::AcceleratorTarget* target) {
- accelerator_manager_->Register(accelerator, target);
+ accelerator_manager_->Register(accelerator,
+ ui::AcceleratorManager::kNormalPriority,
+ target);
}
void AcceleratorController::Unregister(const ui::Accelerator& accelerator,
@@ -403,7 +405,7 @@ bool AcceleratorController::AcceleratorPressed(
return HandlePrintWindowHierarchy();
#endif
default:
- NOTREACHED() << "Unhandled action " << it->second;;
+ NOTREACHED() << "Unhandled action " << it->second;
}
return false;
}
diff --git a/ash/focus_cycler.cc b/ash/focus_cycler.cc
index eccb992..f1877d1 100644
--- a/ash/focus_cycler.cc
+++ b/ash/focus_cycler.cc
@@ -27,9 +27,13 @@ void FocusCycler::AddWidget(views::Widget* widget) {
widgets_.push_back(widget);
widget->GetFocusManager()->RegisterAccelerator(
- ui::Accelerator(ui::VKEY_F2, false, true, false), this);
+ ui::Accelerator(ui::VKEY_F2, false, true, false),
+ ui::AcceleratorManager::kNormalPriority,
+ this);
widget->GetFocusManager()->RegisterAccelerator(
- ui::Accelerator(ui::VKEY_F1, false, true, false), this);
+ ui::Accelerator(ui::VKEY_F1, false, true, false),
+ ui::AcceleratorManager::kNormalPriority,
+ this);
}
void FocusCycler::RotateFocus(Direction direction) {