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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/screencast/ScreencastApp.js

Issue 2137773002: [DevTools] Replace the target type with capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 unified diff | Download patch
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 {WebInspector.App} 7 * @implements {WebInspector.App}
8 * @implements {WebInspector.TargetManager.Observer} 8 * @implements {WebInspector.TargetManager.Observer}
9 */ 9 */
10 WebInspector.ScreencastApp = function() 10 WebInspector.ScreencastApp = function()
(...skipping 28 matching lines...) Expand all
39 /** 39 /**
40 * @override 40 * @override
41 * @param {!WebInspector.Target} target 41 * @param {!WebInspector.Target} target
42 */ 42 */
43 targetAdded: function(target) 43 targetAdded: function(target)
44 { 44 {
45 if (this._target) 45 if (this._target)
46 return; 46 return;
47 this._target = target; 47 this._target = target;
48 48
49 if (target.isPage()) { 49 if (target.hasBrowserCapability()) {
50 this._screencastView = new WebInspector.ScreencastView(target); 50 this._screencastView = new WebInspector.ScreencastView(target);
51 this._rootSplitWidget.setMainWidget(this._screencastView); 51 this._rootSplitWidget.setMainWidget(this._screencastView);
52 this._screencastView.initialize(); 52 this._screencastView.initialize();
53 } else { 53 } else {
54 this._toggleButton.setEnabled(false); 54 this._toggleButton.setEnabled(false);
55 } 55 }
56 this._onScreencastEnabledChanged(); 56 this._onScreencastEnabledChanged();
57 }, 57 },
58 58
59 /** 59 /**
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 WebInspector.ScreencastAppProvider.prototype = { 137 WebInspector.ScreencastAppProvider.prototype = {
138 /** 138 /**
139 * @override 139 * @override
140 * @return {!WebInspector.App} 140 * @return {!WebInspector.App}
141 */ 141 */
142 createApp: function() 142 createApp: function()
143 { 143 {
144 return WebInspector.ScreencastApp._instance(); 144 return WebInspector.ScreencastApp._instance();
145 } 145 }
146 }; 146 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698