Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1654)

Unified Diff: Source/devtools/front_end/ui/ShortcutRegistry.js

Issue 663083004: [DevTools] Remove remaining usages of global properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/ui/RootView.js ('k') | Source/devtools/front_end/ui/SoftContextMenu.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/ShortcutRegistry.js
diff --git a/Source/devtools/front_end/ui/ShortcutRegistry.js b/Source/devtools/front_end/ui/ShortcutRegistry.js
index 0c2be000ce11f93c8f083e77bf68407f710dedca..064aab9f5c07f8f3c2a449a5605bed9c2deab9a6 100644
--- a/Source/devtools/front_end/ui/ShortcutRegistry.js
+++ b/Source/devtools/front_end/ui/ShortcutRegistry.js
@@ -5,15 +5,16 @@
/**
* @constructor
* @param {!WebInspector.ActionRegistry} actionRegistry
+ * @param {!Document} document
*/
-WebInspector.ShortcutRegistry = function(actionRegistry)
+WebInspector.ShortcutRegistry = function(actionRegistry, document)
{
this._actionRegistry = actionRegistry;
/** @type {!StringMultimap.<string>} */
this._defaultKeyToActions = new StringMultimap();
/** @type {!StringMultimap.<!WebInspector.KeyboardShortcut.Descriptor>} */
this._defaultActionToShortcut = new StringMultimap();
- this._registerBindings();
+ this._registerBindings(document);
}
WebInspector.ShortcutRegistry.prototype = {
@@ -179,7 +180,10 @@ WebInspector.ShortcutRegistry.prototype = {
}
},
- _registerBindings: function()
+ /**
+ * @param {!Document} document
+ */
+ _registerBindings: function(document)
{
document.addEventListener("input", this.dismissPendingShortcutAction.bind(this), true);
var extensions = self.runtime.extensions(WebInspector.ActionDelegate);
« no previous file with comments | « Source/devtools/front_end/ui/RootView.js ('k') | Source/devtools/front_end/ui/SoftContextMenu.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698