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

Unified Diff: Source/devtools/front_end/main/Toolbox.js

Issue 460673003: DevTools: Decouple AdvancedApp from Toolbox (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/main/AdvancedApp.js ('k') | Source/devtools/front_end/toolbox/ToolboxDelegate.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/main/Toolbox.js
diff --git a/Source/devtools/front_end/main/Toolbox.js b/Source/devtools/front_end/main/Toolbox.js
new file mode 100644
index 0000000000000000000000000000000000000000..4eb9e3dc70ab83c76d09b0ad9e65b700ad5b7867
--- /dev/null
+++ b/Source/devtools/front_end/main/Toolbox.js
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function windowLoaded()
+{
+ window.removeEventListener("DOMContentLoaded", windowLoaded, false);
+ new WebInspector.Toolbox();
+}
+window.addEventListener("DOMContentLoaded", windowLoaded, false);
+
+/**
+ * @constructor
+ */
+WebInspector.Toolbox = function()
+{
+ if (!window.opener)
+ return;
+
+ WebInspector.zoomManager = new WebInspector.ZoomManager(window.opener.InspectorFrontendHost);
+ WebInspector.overridesSupport = window.opener.WebInspector.overridesSupport;
+ WebInspector.settings = window.opener.WebInspector.settings;
+ WebInspector.experimentsSettings = window.opener.WebInspector.experimentsSettings;
+ WebInspector.targetManager = window.opener.WebInspector.targetManager;
+ WebInspector.workspace = window.opener.WebInspector.workspace;
+ WebInspector.cssWorkspaceBinding = window.opener.WebInspector.cssWorkspaceBinding;
+ WebInspector.Revealer = window.opener.WebInspector.Revealer;
+ WebInspector.ContextMenu = window.opener.WebInspector.ContextMenu;
+ WebInspector.installPortStyles();
+
+ var delegate = /** @type {!WebInspector.ToolboxDelegate} */ (window.opener.WebInspector["app"]);
dgozman 2014/08/13 13:47:33 Now that we are casting here, we can just |window.
apavlov 2014/08/13 13:50:28 AdvancedApp should not be visible to the Toolbox,
apavlov 2014/08/13 13:51:48 Ah, I get your point now. No, the compiler will no
+ var rootView = new WebInspector.RootView();
+ var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder();
+ this._responsiveDesignView = new WebInspector.ResponsiveDesignView(inspectedPagePlaceholder);
+ this._responsiveDesignView.show(rootView.element);
+ rootView.attachToBody();
+ delegate.toolboxLoaded(this._responsiveDesignView, inspectedPagePlaceholder);
+}
« no previous file with comments | « Source/devtools/front_end/main/AdvancedApp.js ('k') | Source/devtools/front_end/toolbox/ToolboxDelegate.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698