| 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 * @extends {WebInspector.App} | 7 * @extends {WebInspector.App} |
| 8 */ | 8 */ |
| 9 WebInspector.ScreencastApp = function() | 9 WebInspector.ScreencastApp = function() |
| 10 { | 10 { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 WebInspector.inspectorView.show(this._rootSplitView.sidebarElement()); | 34 WebInspector.inspectorView.show(this._rootSplitView.sidebarElement()); |
| 35 rootView.attachToBody(); | 35 rootView.attachToBody(); |
| 36 }, | 36 }, |
| 37 | 37 |
| 38 /** | 38 /** |
| 39 * @param {!WebInspector.Target} mainTarget | 39 * @param {!WebInspector.Target} mainTarget |
| 40 */ | 40 */ |
| 41 presentUI: function(mainTarget) | 41 presentUI: function(mainTarget) |
| 42 { | 42 { |
| 43 if (mainTarget.hasCapability(WebInspector.Target.Capabilities.canScreenc
ast)) { | 43 if (mainTarget.hasCapability(WebInspector.Target.Capabilities.CanScreenc
ast)) { |
| 44 this._screencastView = new WebInspector.ScreencastView(mainTarget); | 44 this._screencastView = new WebInspector.ScreencastView(mainTarget); |
| 45 this._screencastView.show(this._rootSplitView.mainElement()); | 45 this._screencastView.show(this._rootSplitView.mainElement()); |
| 46 this._screencastView.initialize(); | 46 this._screencastView.initialize(); |
| 47 this._onStatusBarButtonStateChanged(this._currentScreencastState.get
()); | 47 this._onStatusBarButtonStateChanged(this._currentScreencastState.get
()); |
| 48 } else { | 48 } else { |
| 49 this._onStatusBarButtonStateChanged("disabled"); | 49 this._onStatusBarButtonStateChanged("disabled"); |
| 50 this._toggleScreencastButton.setEnabled(false); | 50 this._toggleScreencastButton.setEnabled(false); |
| 51 } | 51 } |
| 52 WebInspector.App.prototype.presentUI.call(this, mainTarget); | 52 WebInspector.App.prototype.presentUI.call(this, mainTarget); |
| 53 }, | 53 }, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 /** | 88 /** |
| 89 * @return {?WebInspector.StatusBarButton} | 89 * @return {?WebInspector.StatusBarButton} |
| 90 */ | 90 */ |
| 91 button: function() | 91 button: function() |
| 92 { | 92 { |
| 93 if (!(WebInspector.app instanceof WebInspector.ScreencastApp)) | 93 if (!(WebInspector.app instanceof WebInspector.ScreencastApp)) |
| 94 return null; | 94 return null; |
| 95 return /** @type {!WebInspector.ScreencastApp} */ (WebInspector.app)._to
ggleScreencastButton; | 95 return /** @type {!WebInspector.ScreencastApp} */ (WebInspector.app)._to
ggleScreencastButton; |
| 96 } | 96 } |
| 97 } | 97 } |
| OLD | NEW |