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

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

Issue 388963004: DevTools: get rid of the global capabilities set. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 6 years, 5 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/host/Platform.js ('k') | Source/devtools/front_end/profiler/ProfilesPanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/main/Main.js
diff --git a/Source/devtools/front_end/main/Main.js b/Source/devtools/front_end/main/Main.js
index 1b776acb213c7dfabba7b01e516e67084c81639b..d3dc73b9e8974d81cd2e8459472bcc2fbf2f17d2 100644
--- a/Source/devtools/front_end/main/Main.js
+++ b/Source/devtools/front_end/main/Main.js
@@ -51,7 +51,7 @@ WebInspector.Main.prototype = {
_registerModules: function()
{
var configuration;
- if (!Capabilities.isMainFrontend) {
+ if (WebInspector.isWorkerFrontend()) {
configuration = ["main", "sources", "timeline", "profiler", "console", "source_frame"];
} else {
configuration = ["main", "elements", "network", "sources", "timeline", "profiler", "resources", "audits", "console", "source_frame", "extensions", "settings"];
@@ -146,7 +146,7 @@ WebInspector.Main.prototype = {
{
if (result) {
pauseAndResume.call(this);
- } else if (!Capabilities.isMainFrontend) {
+ } else if (WebInspector.isWorkerFrontend()) {
calculateTitle.call(this);
}
}
@@ -274,7 +274,7 @@ WebInspector.Main.prototype = {
WebInspector.dockController = new WebInspector.DockController(!!WebInspector.queryParam("can_dock"));
WebInspector.overridesSupport = new WebInspector.OverridesSupport(WebInspector.dockController.canDock());
- if (mainTarget.canScreencast)
+ if (mainTarget.hasCapability(WebInspector.Target.Capabilities.canScreencast))
WebInspector.app = new WebInspector.ScreencastApp();
else if (WebInspector.dockController.canDock())
WebInspector.app = new WebInspector.AdvancedApp();
@@ -295,7 +295,7 @@ WebInspector.Main.prototype = {
InspectorBackend.registerInspectorDispatcher(this);
- if (Capabilities.isMainFrontend) {
+ if (!WebInspector.isWorkerFrontend()) {
WebInspector.inspectElementModeController = new WebInspector.InspectElementModeController();
WebInspector.workerFrontendManager = new WebInspector.WorkerFrontendManager();
} else {
« no previous file with comments | « Source/devtools/front_end/host/Platform.js ('k') | Source/devtools/front_end/profiler/ProfilesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698