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

Side by Side Diff: Source/devtools/front_end/main/AdvancedApp.js

Issue 673163004: [DevTools] Extract platform module. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed bug in hosted mode Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/host/module.json ('k') | Source/devtools/front_end/main/module.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * @extends {WebInspector.App} 7 * @extends {WebInspector.App}
8 * @implements {WebInspector.ToolboxHost}
9 */ 8 */
10 WebInspector.AdvancedApp = function() 9 WebInspector.AdvancedApp = function()
11 { 10 {
12 WebInspector.App.call(this); 11 WebInspector.App.call(this);
13 if (WebInspector.overridesSupport.responsiveDesignAvailable()) { 12 if (WebInspector.overridesSupport.responsiveDesignAvailable()) {
14 this._toggleEmulationButton = new WebInspector.StatusBarButton(WebInspec tor.UIString("Toggle device mode."), "emulation-status-bar-item"); 13 this._toggleEmulationButton = new WebInspector.StatusBarButton(WebInspec tor.UIString("Toggle device mode."), "emulation-status-bar-item");
15 this._toggleEmulationButton.toggled = WebInspector.overridesSupport.emul ationEnabled(); 14 this._toggleEmulationButton.toggled = WebInspector.overridesSupport.emul ationEnabled();
16 this._toggleEmulationButton.addEventListener("click", this._toggleEmulat ionEnabled, this); 15 this._toggleEmulationButton.addEventListener("click", this._toggleEmulat ionEnabled, this);
17 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSup port.Events.EmulationStateChanged, this._emulationEnabledChanged, this); 16 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSup port.Events.EmulationStateChanged, this._emulationEnabledChanged, this);
18 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSup port.Events.OverridesWarningUpdated, this._overridesWarningUpdated, this); 17 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSup port.Events.OverridesWarningUpdated, this._overridesWarningUpdated, this);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 85
87 if (this._toolboxWindow) 86 if (this._toolboxWindow)
88 return; 87 return;
89 88
90 var url = window.location.href.replace("devtools.html", "toolbox.html"); 89 var url = window.location.href.replace("devtools.html", "toolbox.html");
91 this._toolboxWindow = window.open(url, undefined); 90 this._toolboxWindow = window.open(url, undefined);
92 }, 91 },
93 92
94 /** 93 /**
95 * @param {!Document} toolboxDocument 94 * @param {!Document} toolboxDocument
96 * @override
97 */ 95 */
98 toolboxLoaded: function(toolboxDocument) 96 toolboxLoaded: function(toolboxDocument)
99 { 97 {
100 WebInspector.initializeUIUtils(toolboxDocument.defaultView); 98 WebInspector.initializeUIUtils(toolboxDocument.defaultView);
101 WebInspector.installComponentRootStyles(/** @type {!Element} */ (toolbox Document.body)); 99 WebInspector.installComponentRootStyles(/** @type {!Element} */ (toolbox Document.body));
102 WebInspector.ContextMenu.installHandler(toolboxDocument); 100 WebInspector.ContextMenu.installHandler(toolboxDocument);
103 101
104 var rootView = new WebInspector.RootView(); 102 var rootView = new WebInspector.RootView();
105 var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder (); 103 var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder ();
106 inspectedPagePlaceholder.addEventListener(WebInspector.InspectedPagePlac eholder.Events.Update, this._onSetInspectedPageBounds.bind(this, true)); 104 inspectedPagePlaceholder.addEventListener(WebInspector.InspectedPagePlac eholder.Events.Update, this._onSetInspectedPageBounds.bind(this, true));
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 handleAction: function() 293 handleAction: function()
296 { 294 {
297 if (!WebInspector.overridesSupport.responsiveDesignAvailable()) 295 if (!WebInspector.overridesSupport.responsiveDesignAvailable())
298 return false; 296 return false;
299 if (!(WebInspector.app instanceof WebInspector.AdvancedApp)) 297 if (!(WebInspector.app instanceof WebInspector.AdvancedApp))
300 return false; 298 return false;
301 WebInspector.app._toggleEmulationEnabled(); 299 WebInspector.app._toggleEmulationEnabled();
302 return true; 300 return true;
303 } 301 }
304 } 302 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/host/module.json ('k') | Source/devtools/front_end/main/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698