Index: ui/views/focus/focus_manager.h |
=================================================================== |
--- ui/views/focus/focus_manager.h (revision 122745) |
+++ ui/views/focus/focus_manager.h (working copy) |
@@ -189,6 +189,14 @@ |
// Register a keyboard accelerator for the specified target. If multiple |
// targets are registered for an accelerator, a target registered later has |
// higher priority. |
+ // |accelerator| is the accelerator to register. |
+ // |priority| denotes whether the |target| is a priority handler or not. |
+ // NOTE: In almost all cases, you should specify |false| for this parameter. |
+ // Setting it to |true| prevents Chrome from sending the shortcut to the |
+ // webpage if the renderer has focus, which is not desirable except for |
+ // isolated cases. |
+ // |target| is the AcceleratorTarget that handles the event once the |
+ // accelerator is pressed. |
// Note that we are currently limited to accelerators that are either: |
// - a key combination including Ctrl or Alt |
// - the escape key |
@@ -196,6 +204,7 @@ |
// - any F key (F1, F2, F3 ...) |
// - any browser specific keys (as available on special keyboards) |
void RegisterAccelerator(const ui::Accelerator& accelerator, |
+ bool priority, |
ui::AcceleratorTarget* target); |
// Unregister the specified keyboard accelerator for the specified target. |
@@ -239,6 +248,9 @@ |
ui::AcceleratorTarget* GetCurrentTargetForAccelerator( |
const ui::Accelerator& accelertor) const; |
+ // Whether the given |accelerator| has a priority handler associated with it. |
+ bool HasPriorityHandler(const ui::Accelerator& accelerator) const; |
+ |
// Clears the native view having the focus. |
virtual void ClearNativeFocus(); |