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

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

Issue 1311783003: Devtools[LayoutEditor]: Rework layout-editor workflow (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@resize
Patch Set: Address comments Created 5 years, 3 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
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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 { 274 {
275 var panelName = this._tabbedPane.selectedTabId; 275 var panelName = this._tabbedPane.selectedTabId;
276 if (!panelName) 276 if (!panelName)
277 return; 277 return;
278 278
279 this.showPanel(panelName); 279 this.showPanel(panelName);
280 }, 280 },
281 281
282 /** 282 /**
283 * @param {!WebInspector.Panel} panel 283 * @param {!WebInspector.Panel} panel
284 * @param {boolean=} suppressBringToFront
284 * @return {!WebInspector.Panel} 285 * @return {!WebInspector.Panel}
285 */ 286 */
286 setCurrentPanel: function(panel) 287 setCurrentPanel: function(panel, suppressBringToFront)
287 { 288 {
288 delete this._panelForShowPromise; 289 delete this._panelForShowPromise;
289 290
290 if (this._currentPanelLocked) { 291 if (this._currentPanelLocked) {
291 console.error("Current panel is locked"); 292 console.error("Current panel is locked");
292 return this._currentPanel; 293 return this._currentPanel;
293 } 294 }
294 InspectorFrontendHost.bringToFront(); 295
296 if (!suppressBringToFront)
297 InspectorFrontendHost.bringToFront();
295 298
296 if (this._currentPanel === panel) 299 if (this._currentPanel === panel)
297 return panel; 300 return panel;
298 301
299 this._currentPanel = panel; 302 this._currentPanel = panel;
300 if (!this._panels[panel.name]) 303 if (!this._panels[panel.name])
301 this._panels[panel.name] = panel; 304 this._panels[panel.name] = panel;
302 this._tabbedPane.changeTabView(panel.name, panel); 305 this._tabbedPane.changeTabView(panel.name, panel);
303 this._tabbedPane.removeEventListener(WebInspector.TabbedPane.EventTypes. TabSelected, this._tabSelected, this); 306 this._tabbedPane.removeEventListener(WebInspector.TabbedPane.EventTypes. TabSelected, this._tabSelected, this);
304 this._tabbedPane.selectTab(panel.name); 307 this._tabbedPane.selectTab(panel.name);
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 * @param {string} actionId 530 * @param {string} actionId
528 */ 531 */
529 handleAction: function(context, actionId) 532 handleAction: function(context, actionId)
530 { 533 {
531 if (WebInspector.inspectorView.drawerVisible()) 534 if (WebInspector.inspectorView.drawerVisible())
532 WebInspector.inspectorView.closeDrawer(); 535 WebInspector.inspectorView.closeDrawer();
533 else 536 else
534 WebInspector.inspectorView.showDrawer(); 537 WebInspector.inspectorView.showDrawer();
535 } 538 }
536 } 539 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698