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

Side by Side Diff: Source/devtools/front_end/ForwardedInputEventHandler.js

Issue 311193002: DevTools: Implement debugger pause-resume through an action (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comment Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/sources/SourcesPanel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 */ 7 */
8 WebInspector.ForwardedInputEventHandler = function() 8 WebInspector.ForwardedInputEventHandler = function()
9 { 9 {
10 } 10 }
11 11
12 WebInspector.ForwardedInputEventHandler.prototype = { 12 WebInspector.ForwardedInputEventHandler.prototype = {
13 /** 13 /**
14 * @param {string} type 14 * @param {string} type
15 * @param {string} keyIdentifier 15 * @param {string} keyIdentifier
16 * @param {number} keyCode 16 * @param {number} keyCode
17 * @param {number} modifiers 17 * @param {number} modifiers
18 */ 18 */
19 keyEventReceived: function(type, keyIdentifier, keyCode, modifiers) 19 keyEventReceived: function(type, keyIdentifier, keyCode, modifiers)
20 { 20 {
21 if (type !== "keydown") 21 if (type !== "keydown")
22 return; 22 return;
23 23
24 // FIXME: Wire this to the shortcut/action subsystem. 24 WebInspector.context.setFlavor(WebInspector.ShortcutRegistry.ForwardedSh ortcut, WebInspector.ShortcutRegistry.ForwardedShortcut.instance)
25 if (keyIdentifier === "F8" && !modifiers)
26 /** @type {!WebInspector.SourcesPanel} */ (WebInspector.inspectorVie w.showPanel("sources")).togglePause();
27
28 WebInspector.shortcutRegistry.handleKey(WebInspector.KeyboardShortcut.ma keKey(keyCode, modifiers), keyIdentifier); 25 WebInspector.shortcutRegistry.handleKey(WebInspector.KeyboardShortcut.ma keKey(keyCode, modifiers), keyIdentifier);
26 WebInspector.context.setFlavor(WebInspector.ShortcutRegistry.ForwardedSh ortcut, null);
29 } 27 }
30 } 28 }
31 29
32 /** @type {!WebInspector.ForwardedInputEventHandler} */ 30 /** @type {!WebInspector.ForwardedInputEventHandler} */
33 WebInspector.forwardedEventHandler = new WebInspector.ForwardedInputEventHandler (); 31 WebInspector.forwardedEventHandler = new WebInspector.ForwardedInputEventHandler ();
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/sources/SourcesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698