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

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

Issue 71633003: DevTools: added "overlayContents" mode, where DevTools content is placed around and underneath inse… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No-op if no overlayContents Created 7 years 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) 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 if (this.inspectElementModeController) 60 if (this.inspectElementModeController)
61 this.inspectorView.appendToLeftToolbar(this.inspectElementModeContro ller.toggleSearchButton.element); 61 this.inspectorView.appendToLeftToolbar(this.inspectElementModeContro ller.toggleSearchButton.element);
62 62
63 if (Capabilities.canScreencast) { 63 if (Capabilities.canScreencast) {
64 this._toggleScreencastButton = new WebInspector.StatusBarButton(WebI nspector.UIString("Toggle screencast."), "screencast-status-bar-item"); 64 this._toggleScreencastButton = new WebInspector.StatusBarButton(WebI nspector.UIString("Toggle screencast."), "screencast-status-bar-item");
65 this._toggleScreencastButton.addEventListener("click", this._toggleS creencastButtonClicked.bind(this), false); 65 this._toggleScreencastButton.addEventListener("click", this._toggleS creencastButtonClicked.bind(this), false);
66 this.inspectorView.appendToLeftToolbar(this._toggleScreencastButton. element); 66 this.inspectorView.appendToLeftToolbar(this._toggleScreencastButton. element);
67 } 67 }
68 68
69 this.inspectorView.appendToRightToolbar(this.settingsController.statusBa rItem); 69 this.inspectorView.appendToRightToolbar(this.settingsController.statusBa rItem);
70 if (!WebInspector.queryParamsObject["remoteFrontend"]) 70 if (!WebInspector.queryParamsObject["remoteFrontend"] && !WebInspector.W orkerManager.isWorkerFrontend())
pfeldman 2013/12/05 15:44:06 We need to handle even more cases, not sure you ne
71 this.inspectorView.appendToRightToolbar(this.dockController.element) ; 71 this.inspectorView.appendToRightToolbar(this.dockController.element) ;
72 72
73 var closeButtonToolbarItem = document.createElementWithClass("div", "too lbar-close-button-item"); 73 var closeButtonToolbarItem = document.createElementWithClass("div", "too lbar-close-button-item");
74 var closeButtonElement = closeButtonToolbarItem.createChild("div", "clos e-button"); 74 var closeButtonElement = closeButtonToolbarItem.createChild("div", "clos e-button");
75 closeButtonElement.addEventListener("click", WebInspector.close.bind(Web Inspector), true); 75 closeButtonElement.addEventListener("click", WebInspector.close.bind(Web Inspector), true);
76 this.inspectorView.appendToRightToolbar(closeButtonToolbarItem); 76 this.inspectorView.appendToRightToolbar(closeButtonToolbarItem);
77 }, 77 },
78 78
79 /** 79 /**
80 * @return {boolean} 80 * @return {boolean}
81 */ 81 */
82 isInspectingDevice: function() 82 isInspectingDevice: function()
83 { 83 {
84 return !!WebInspector.queryParamsObject["remoteFrontend"]; 84 return !!WebInspector.queryParamsObject["remoteFrontend"];
85 }, 85 },
86 86
87 /**
88 * @return {boolean}
89 */
90 useOverlayContentsLayout: function()
91 {
92 var docked = WebInspector.queryParamsObject["dockSide"] !== WebInspector .DockController.State.Undocked;
93 if (WebInspector.dockController)
94 docked = WebInspector.dockController.dockSide() !== WebInspector.Doc kController.State.Undocked;
95 return docked && !!WebInspector.queryParamsObject["overlayContents"];
pfeldman 2013/12/05 15:44:06 I think you only want this bit here: return !!Web
dgozman 2013/12/06 16:17:13 Done.
96 },
97
87 _toggleScreencastButtonClicked: function() 98 _toggleScreencastButtonClicked: function()
88 { 99 {
89 this._toggleScreencastButton.toggled = !this._toggleScreencastButton.tog gled; 100 this._toggleScreencastButton.toggled = !this._toggleScreencastButton.tog gled;
90 WebInspector.settings.screencastEnabled.set(this._toggleScreencastButton .toggled); 101 WebInspector.settings.screencastEnabled.set(this._toggleScreencastButton .toggled);
91 102
92 if (this._toggleScreencastButton.toggled) { 103 if (this._toggleScreencastButton.toggled) {
93 if (!this._screencastView) { 104 if (!this._screencastView) {
94 // Rebuild the UI upon first invocation. 105 // Rebuild the UI upon first invocation.
95 this._screencastView = new WebInspector.ScreencastView(); 106 this._screencastView = new WebInspector.ScreencastView();
96 this._screencastSplitView = new WebInspector.SplitView(true, Web Inspector.settings.screencastSidebarWidth.name); 107 this._screencastSplitView = new WebInspector.SplitView(true, Web Inspector.settings.screencastSidebarWidth.name);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 WebInspector._doLoadedDoneWithCapabilities(); 338 WebInspector._doLoadedDoneWithCapabilities();
328 } 339 }
329 } 340 }
330 341
331 WebInspector.doLoadedDone = function() 342 WebInspector.doLoadedDone = function()
332 { 343 {
333 // Install styles and themes 344 // Install styles and themes
334 WebInspector.installPortStyles(); 345 WebInspector.installPortStyles();
335 if (WebInspector.socket) 346 if (WebInspector.socket)
336 document.body.addStyleClass("remote"); 347 document.body.addStyleClass("remote");
348 if (WebInspector.queryParamsObject["overlayContents"])
349 document.body.addStyleClass("overlay-contents");
337 350
338 if (WebInspector.queryParamsObject.toolbarColor && WebInspector.queryParamsO bject.textColor) 351 if (WebInspector.queryParamsObject.toolbarColor && WebInspector.queryParamsO bject.textColor)
339 WebInspector.setToolbarColors(WebInspector.queryParamsObject.toolbarColo r, WebInspector.queryParamsObject.textColor); 352 WebInspector.setToolbarColors(WebInspector.queryParamsObject.toolbarColo r, WebInspector.queryParamsObject.textColor);
340 353
341 WebInspector.WorkerManager.loaded(); 354 WebInspector.WorkerManager.loaded();
342 355
343 PageAgent.canScreencast(WebInspector._initializeCapability.bind(WebInspector , "canScreencast", null)); 356 PageAgent.canScreencast(WebInspector._initializeCapability.bind(WebInspector , "canScreencast", null));
344 WorkerAgent.canInspectWorkers(WebInspector._initializeCapability.bind(WebIns pector, "canInspectWorkers", WebInspector._doLoadedDoneWithCapabilities.bind(Web Inspector))); 357 WorkerAgent.canInspectWorkers(WebInspector._initializeCapability.bind(WebIns pector, "canInspectWorkers", WebInspector._doLoadedDoneWithCapabilities.bind(Web Inspector)));
345 } 358 }
346 359
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 1024
1012 /** 1025 /**
1013 * @return {string} 1026 * @return {string}
1014 */ 1027 */
1015 WebInspector.getSelectionForegroundColor = function() 1028 WebInspector.getSelectionForegroundColor = function()
1016 { 1029 {
1017 return InspectorFrontendHost.getSelectionForegroundColor(); 1030 return InspectorFrontendHost.getSelectionForegroundColor();
1018 } 1031 }
1019 1032
1020 window.DEBUG = true; 1033 window.DEBUG = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698