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

Side by Side Diff: Source/devtools/front_end/devtools_app/DevToolsApp.js

Issue 725583003: [DevTools] Prepare to pass modified InspectorFrontendHost to inspector app. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed comment 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/devtools.gypi ('k') | Source/devtools/front_end/devtools_app/UITests.js » ('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 * @implements {InspectorAppHostAPI} 7 * @suppressGlobalPropertiesCheck
8 */ 8 */
9 WebInspector.DevToolsApp = function() 9 WebInspector.DevToolsApp = function()
10 { 10 {
11 window.InspectorAppHost = this; 11 this._iframe = document.querySelector("iframe.inspector-app-iframe");
12 12
13 /** 13 /**
14 * @type {?Window} 14 * @type {!Window}
15 */ 15 */
16 this._inspectorWindow = null; 16 this._inspectorWindow = this._iframe.contentWindow;
17 this._inspectorWindow.InspectorFrontendHost = window.InspectorFrontendHost;
17 } 18 }
18 19
19 WebInspector.DevToolsApp.prototype = { 20 WebInspector.DevToolsApp.prototype = {
20 /**
21 * @param {!Window} inspectorWindow
22 * @override
23 */
24 inspectorAppWindowLoaded: function(inspectorWindow)
25 {
26 this._inspectorWindow = inspectorWindow;
27 if (window.domAutomationController)
28 this._inspectorWindow.domAutomationController = window.domAutomation Controller;
29 },
30
31 /**
32 * @override
33 */
34 beforeInspectorAppLoad: function()
35 {
36 if (this._inspectorWindow.uiTests) {
37 // FIXME: move Tests to the host or teach browser counterpart about iframe.
38 window.uiTests = this._inspectorWindow.uiTests;
39 }
40 },
41
42 /**
43 * @override
44 */
45 afterInspectorAppLoad: function()
46 {
47 }
48 } 21 }
49 22
50 new WebInspector.DevToolsApp(); 23 runOnWindowLoad(function() { new WebInspector.DevToolsApp(); });
OLDNEW
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/devtools_app/UITests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698