OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @param {!WebInspector.ActionRegistry} actionRegistry | 7 * @param {!WebInspector.ActionRegistry} actionRegistry |
8 * @param {!Document} document | 8 * @param {!Document} document |
9 */ | 9 */ |
10 WebInspector.ShortcutRegistry = function(actionRegistry, document) | 10 WebInspector.ShortcutRegistry = function(actionRegistry, document) |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 * @param {number} key | 83 * @param {number} key |
84 * @param {string} keyIdentifier | 84 * @param {string} keyIdentifier |
85 * @param {!KeyboardEvent=} event | 85 * @param {!KeyboardEvent=} event |
86 */ | 86 */ |
87 handleKey: function(key, keyIdentifier, event) | 87 handleKey: function(key, keyIdentifier, event) |
88 { | 88 { |
89 var keyModifiers = key >> 8; | 89 var keyModifiers = key >> 8; |
90 var actions = this._applicableActions(key); | 90 var actions = this._applicableActions(key); |
91 if (!actions.length) | 91 if (!actions.length) |
92 return; | 92 return; |
93 if (WebInspector.GlassPane.DefaultFocusedViewStack.length > 1) { | 93 if (WebInspector.Dialog.hasInstance()) { |
94 if (event && !isPossiblyInputKey()) | 94 if (event && !isPossiblyInputKey()) |
95 event.consume(true); | 95 event.consume(true); |
96 return; | 96 return; |
97 } | 97 } |
98 | 98 |
99 if (!isPossiblyInputKey()) { | 99 if (!isPossiblyInputKey()) { |
100 if (event) | 100 if (event) |
101 event.consume(true); | 101 event.consume(true); |
102 processNextAction.call(this, false); | 102 processNextAction.call(this, false); |
103 } else { | 103 } else { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 * @constructor | 214 * @constructor |
215 */ | 215 */ |
216 WebInspector.ShortcutRegistry.ForwardedShortcut = function() | 216 WebInspector.ShortcutRegistry.ForwardedShortcut = function() |
217 { | 217 { |
218 } | 218 } |
219 | 219 |
220 WebInspector.ShortcutRegistry.ForwardedShortcut.instance = new WebInspector.Shor
tcutRegistry.ForwardedShortcut(); | 220 WebInspector.ShortcutRegistry.ForwardedShortcut.instance = new WebInspector.Shor
tcutRegistry.ForwardedShortcut(); |
221 | 221 |
222 /** @type {!WebInspector.ShortcutRegistry} */ | 222 /** @type {!WebInspector.ShortcutRegistry} */ |
223 WebInspector.shortcutRegistry; | 223 WebInspector.shortcutRegistry; |
OLD | NEW |