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

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: 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
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 96b972a0c03ae229ac67474fc74e86eb5b4fcdf3..d3f22bb70f5b24fae288b2b9319e3c5725ec84ca 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);
}
}
@@ -292,7 +292,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();
@@ -318,7 +318,7 @@ WebInspector.Main.prototype = {
InspectorBackend.registerInspectorDispatcher(this);
- if (Capabilities.isMainFrontend) {
+ if (!WebInspector.isWorkerFrontend()) {
WebInspector.inspectElementModeController = new WebInspector.InspectElementModeController();
WebInspector.workerFrontendManager = new WebInspector.WorkerFrontendManager();
} else {

Powered by Google App Engine
This is Rietveld 408576698