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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/CommandMenu.js

Issue 2412023002: DevTools: migrate InspectorView to tabbed view location. (Closed)
Patch Set: made layers panel closeable. Created 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/View.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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.CommandMenu = function() 8 WebInspector.CommandMenu = function()
9 { 9 {
10 this._commands = []; 10 this._commands = [];
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 { 310 {
311 var panelName = extension.descriptor()["name"]; 311 var panelName = extension.descriptor()["name"];
312 var tags = extension.descriptor()["tags"] || ""; 312 var tags = extension.descriptor()["tags"] || "";
313 return WebInspector.CommandMenu.createCommand(WebInspector.UIString("Panel") , tags, WebInspector.UIString("Show %s", extension.title()), "", executeHandler, availableHandler); 313 return WebInspector.CommandMenu.createCommand(WebInspector.UIString("Panel") , tags, WebInspector.UIString("Show %s", extension.title()), "", executeHandler, availableHandler);
314 314
315 /** 315 /**
316 * @return {boolean} 316 * @return {boolean}
317 */ 317 */
318 function availableHandler() 318 function availableHandler()
319 { 319 {
320 return WebInspector.inspectorView.currentPanel().name !== panelName; 320 return true;
321 } 321 }
322 322
323 function executeHandler() 323 function executeHandler()
324 { 324 {
325 WebInspector.inspectorView.panel(panelName).then(WebInspector.inspectorV iew.setCurrentPanel.bind(WebInspector.inspectorView)); 325 WebInspector.viewManager.showView(panelName);
326 } 326 }
327 } 327 }
328 328
329 /** 329 /**
330 * @param {!Runtime.Extension} extension 330 * @param {!Runtime.Extension} extension
331 * @return {!WebInspector.CommandMenu.Command} 331 * @return {!WebInspector.CommandMenu.Command}
332 */ 332 */
333 WebInspector.CommandMenu.createRevealDrawerCommand = function(extension) 333 WebInspector.CommandMenu.createRevealDrawerCommand = function(extension)
334 { 334 {
335 var drawerId = extension.descriptor()["id"]; 335 var drawerId = extension.descriptor()["id"];
(...skipping 21 matching lines...) Expand all
357 * @return {boolean} 357 * @return {boolean}
358 */ 358 */
359 handleAction: function(context, actionId) 359 handleAction: function(context, actionId)
360 { 360 {
361 new WebInspector.FilteredListWidget(new WebInspector.CommandMenuDelegate ()).showAsDialog(); 361 new WebInspector.FilteredListWidget(new WebInspector.CommandMenuDelegate ()).showAsDialog();
362 InspectorFrontendHost.bringToFront(); 362 InspectorFrontendHost.bringToFront();
363 return true; 363 return true;
364 } 364 }
365 } 365 }
366 366
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/View.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698