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

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: Re-implement showConsole using showPanel. 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 /** @type {!Object.<string, !WebInspector.PanelDescriptor>} */ 66 /** @type {!Object.<string, !WebInspector.PanelDescriptor>} */
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.ShowPanel, showPanel.bind(this));
77 this._loadPanelDesciptors(); 77 this._loadPanelDesciptors();
78 78
79 /** 79 /**
80 * @this {WebInspector.InspectorView} 80 * @this {WebInspector.InspectorView}
81 * @param {!WebInspector.Event} event
81 */ 82 */
82 function showConsole() 83 function showPanel(event)
83 { 84 {
84 this.showPanel("console"); 85 var panelName = /** @type {string} */ (event.data);
86 this.showPanel(panelName);
85 } 87 }
86 88
87 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event s.SuspendStateChanged, this._onSuspendStateChanged.bind(this)); 89 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event s.SuspendStateChanged, this._onSuspendStateChanged.bind(this));
88 }; 90 };
89 91
90 WebInspector.InspectorView.prototype = { 92 WebInspector.InspectorView.prototype = {
91 wasShown: function() 93 wasShown: function()
92 { 94 {
93 this.element.ownerDocument.addEventListener("keydown", this._keyDownBoun d, false); 95 this.element.ownerDocument.addEventListener("keydown", this._keyDownBoun d, false);
94 this.element.ownerDocument.addEventListener("keypress", this._keyPressBo und, false); 96 this.element.ownerDocument.addEventListener("keypress", this._keyPressBo und, false);
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 */ 563 */
562 handleAction: function(context, actionId) 564 handleAction: function(context, actionId)
563 { 565 {
564 if (WebInspector.inspectorView.drawerVisible()) 566 if (WebInspector.inspectorView.drawerVisible())
565 WebInspector.inspectorView.closeDrawer(); 567 WebInspector.inspectorView.closeDrawer();
566 else 568 else
567 WebInspector.inspectorView.showDrawer(); 569 WebInspector.inspectorView.showDrawer();
568 return true; 570 return true;
569 } 571 }
570 } 572 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | third_party/WebKit/Source/devtools/front_end/devtools.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698