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

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

Issue 218613013: DevTools: Decouple shortcuts from actions, introduce shortcut contexts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments, handle Dialog key events in the glasspane keydown handler Created 6 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 325
326 new WebInspector.DebuggerScriptMapping(WebInspector.debuggerModel, WebIn spector.workspace, WebInspector.networkWorkspaceBinding); 326 new WebInspector.DebuggerScriptMapping(WebInspector.debuggerModel, WebIn spector.workspace, WebInspector.networkWorkspaceBinding);
327 WebInspector.liveEditSupport = new WebInspector.LiveEditSupport(WebInspe ctor.workspace); 327 WebInspector.liveEditSupport = new WebInspector.LiveEditSupport(WebInspe ctor.workspace);
328 new WebInspector.CSSStyleSheetMapping(WebInspector.cssModel, WebInspecto r.workspace, WebInspector.networkWorkspaceBinding); 328 new WebInspector.CSSStyleSheetMapping(WebInspector.cssModel, WebInspecto r.workspace, WebInspector.networkWorkspaceBinding);
329 new WebInspector.PresentationConsoleMessageHelper(WebInspector.workspace ); 329 new WebInspector.PresentationConsoleMessageHelper(WebInspector.workspace );
330 330
331 // Create settings before loading modules. 331 // Create settings before loading modules.
332 WebInspector.settings.initializeBackendSettings(); 332 WebInspector.settings.initializeBackendSettings();
333 333
334 this._registerModules(); 334 this._registerModules();
335 WebInspector.KeyboardShortcut.registerActions(); 335 WebInspector.actionRegistry = new WebInspector.ActionRegistry();
336 WebInspector.KeyboardShortcut.registerBindings();
336 337
337 WebInspector.panels = {}; 338 WebInspector.panels = {};
338 WebInspector.inspectorView = new WebInspector.InspectorView(); 339 WebInspector.inspectorView = new WebInspector.InspectorView();
339 // Screencast controller creates a root view itself. 340 // Screencast controller creates a root view itself.
340 if (mainTarget.canScreencast) 341 if (mainTarget.canScreencast)
341 this._screencastController = new WebInspector.ScreencastController() ; 342 this._screencastController = new WebInspector.ScreencastController() ;
342 else 343 else
343 this._createRootView(); 344 this._createRootView();
344 this._createGlobalStatusBarItems(); 345 this._createGlobalStatusBarItems();
345 346
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 /** 662 /**
662 * @constructor 663 * @constructor
663 * @implements {WebInspector.ActionDelegate} 664 * @implements {WebInspector.ActionDelegate}
664 */ 665 */
665 WebInspector.Main.ReloadActionDelegate = function() 666 WebInspector.Main.ReloadActionDelegate = function()
666 { 667 {
667 } 668 }
668 669
669 WebInspector.Main.ReloadActionDelegate.prototype = { 670 WebInspector.Main.ReloadActionDelegate.prototype = {
670 /** 671 /**
672 * @param {!WebInspector.Context} context
671 * @return {boolean} 673 * @return {boolean}
672 */ 674 */
673 handleAction: function() 675 handleAction: function(context)
674 { 676 {
675 if (!WebInspector.Dialog.currentInstance()) { 677 WebInspector.debuggerModel.skipAllPauses(true, true);
676 WebInspector.debuggerModel.skipAllPauses(true, true); 678 WebInspector.resourceTreeModel.reloadPage(false);
677 WebInspector.resourceTreeModel.reloadPage(false);
678 }
679 return true; 679 return true;
680 } 680 }
681 } 681 }
682 682
683 /** 683 /**
684 * @constructor 684 * @constructor
685 * @implements {WebInspector.ActionDelegate} 685 * @implements {WebInspector.ActionDelegate}
686 */ 686 */
687 WebInspector.Main.HardReloadActionDelegate = function() 687 WebInspector.Main.HardReloadActionDelegate = function()
688 { 688 {
689 } 689 }
690 690
691 WebInspector.Main.HardReloadActionDelegate.prototype = { 691 WebInspector.Main.HardReloadActionDelegate.prototype = {
692 /** 692 /**
693 * @param {!WebInspector.Context} context
693 * @return {boolean} 694 * @return {boolean}
694 */ 695 */
695 handleAction: function() 696 handleAction: function(context)
696 { 697 {
697 if (!WebInspector.Dialog.currentInstance()) { 698 WebInspector.debuggerModel.skipAllPauses(true, true);
698 WebInspector.debuggerModel.skipAllPauses(true, true); 699 WebInspector.resourceTreeModel.reloadPage(true);
699 WebInspector.resourceTreeModel.reloadPage(true);
700 }
701 return true; 700 return true;
702 } 701 }
703 } 702 }
704 703
705 /** 704 /**
706 * @constructor 705 * @constructor
707 * @implements {WebInspector.ActionDelegate} 706 * @implements {WebInspector.ActionDelegate}
708 */ 707 */
709 WebInspector.Main.DebugReloadActionDelegate = function() 708 WebInspector.Main.DebugReloadActionDelegate = function()
710 { 709 {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 767
769 WebInspector.__defineGetter__("inspectedPageURL", function() 768 WebInspector.__defineGetter__("inspectedPageURL", function()
770 { 769 {
771 return WebInspector.resourceTreeModel.inspectedPageURL(); 770 return WebInspector.resourceTreeModel.inspectedPageURL();
772 }); 771 });
773 772
774 WebInspector.panel = function(name) 773 WebInspector.panel = function(name)
775 { 774 {
776 return WebInspector.inspectorView.panel(name); 775 return WebInspector.inspectorView.panel(name);
777 } 776 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698