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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/InspectorView.js

Issue 1433953002: Implement a ShowSecurityPanel() call in the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement a general showPanel command. Created 5 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 this._panelDescriptors = {}; 67 this._panelDescriptors = {};
68 /** @type {!Object.<string, !Promise.<!WebInspector.Panel> >} */ 68 /** @type {!Object.<string, !Promise.<!WebInspector.Panel> >} */
69 this._panelPromises = {}; 69 this._panelPromises = {};
70 70
71 // Windows and Mac have two different definitions of '[' and ']', so accept both of each. 71 // Windows and Mac have two different definitions of '[' and ']', so accept both of each.
72 this._openBracketIdentifiers = ["U+005B", "U+00DB"].keySet(); 72 this._openBracketIdentifiers = ["U+005B", "U+00DB"].keySet();
73 this._closeBracketIdentifiers = ["U+005D", "U+00DD"].keySet(); 73 this._closeBracketIdentifiers = ["U+005D", "U+00DD"].keySet();
74 this._lastActivePanelSetting = WebInspector.settings.createSetting("lastActi vePanel", "elements"); 74 this._lastActivePanelSetting = WebInspector.settings.createSetting("lastActi vePanel", "elements");
75 75
76 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event s.ShowConsole, showConsole.bind(this)); 76 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event s.ShowConsole, showConsole.bind(this));
77 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event s.ShowPanel, showPanel.bind(this));
77 this._loadPanelDesciptors(); 78 this._loadPanelDesciptors();
78 79
79 /** 80 /**
80 * @this {WebInspector.InspectorView} 81 * @this {WebInspector.InspectorView}
81 */ 82 */
82 function showConsole() 83 function showConsole()
83 { 84 {
84 this.showPanel("console"); 85 this.showPanel("console");
pfeldman 2015/11/13 01:33:49 This would go then
85 } 86 }
86 87
88 /**
89 * @this {WebInspector.InspectorView}
90 * @param {!WebInspector.Event} event
91 */
92 function showPanel(event)
93 {
94 var panelName = /** @type {string} */ (event.data);
95 this.showPanel(panelName);
96 }
97
87 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event s.SuspendStateChanged, this._onSuspendStateChanged.bind(this)); 98 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event s.SuspendStateChanged, this._onSuspendStateChanged.bind(this));
88 }; 99 };
89 100
90 WebInspector.InspectorView.prototype = { 101 WebInspector.InspectorView.prototype = {
91 wasShown: function() 102 wasShown: function()
92 { 103 {
93 this.element.ownerDocument.addEventListener("keydown", this._keyDownBoun d, false); 104 this.element.ownerDocument.addEventListener("keydown", this._keyDownBoun d, false);
94 this.element.ownerDocument.addEventListener("keypress", this._keyPressBo und, false); 105 this.element.ownerDocument.addEventListener("keypress", this._keyPressBo und, false);
95 }, 106 },
96 107
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 */ 572 */
562 handleAction: function(context, actionId) 573 handleAction: function(context, actionId)
563 { 574 {
564 if (WebInspector.inspectorView.drawerVisible()) 575 if (WebInspector.inspectorView.drawerVisible())
565 WebInspector.inspectorView.closeDrawer(); 576 WebInspector.inspectorView.closeDrawer();
566 else 577 else
567 WebInspector.inspectorView.showDrawer(); 578 WebInspector.inspectorView.showDrawer();
568 return true; 579 return true;
569 } 580 }
570 } 581 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698