| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }; |
| OLD | NEW |