| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 _onScreencastEnabledChanged: function() | 83 _onScreencastEnabledChanged: function() |
| 84 { | 84 { |
| 85 if (!this._rootSplitWidget) | 85 if (!this._rootSplitWidget) |
| 86 return; | 86 return; |
| 87 var enabled = this._enabledSetting.get() && this._screencastView; | 87 var enabled = this._enabledSetting.get() && this._screencastView; |
| 88 this._toggleButton.setToggled(enabled); | 88 this._toggleButton.setToggled(enabled); |
| 89 if (enabled) | 89 if (enabled) |
| 90 this._rootSplitWidget.showBoth(); | 90 this._rootSplitWidget.showBoth(); |
| 91 else | 91 else |
| 92 this._rootSplitWidget.hideMain(); | 92 this._rootSplitWidget.hideMain(); |
| 93 }, | |
| 94 | |
| 95 _requestAppBanner: function() | |
| 96 { | |
| 97 if (this._target && this._target.pageAgent()) | |
| 98 this._target.pageAgent().requestAppBanner(); | |
| 99 } | 93 } |
| 100 }; | 94 }; |
| 101 | 95 |
| 102 | 96 |
| 103 /** @type {!WebInspector.ScreencastApp} */ | 97 /** @type {!WebInspector.ScreencastApp} */ |
| 104 WebInspector.ScreencastApp._appInstance; | 98 WebInspector.ScreencastApp._appInstance; |
| 105 | 99 |
| 106 /** | 100 /** |
| 107 * @return {!WebInspector.ScreencastApp} | 101 * @return {!WebInspector.ScreencastApp} |
| 108 */ | 102 */ |
| (...skipping 16 matching lines...) Expand all Loading... |
| 125 /** | 119 /** |
| 126 * @override | 120 * @override |
| 127 * @return {?WebInspector.ToolbarItem} | 121 * @return {?WebInspector.ToolbarItem} |
| 128 */ | 122 */ |
| 129 item: function() | 123 item: function() |
| 130 { | 124 { |
| 131 return WebInspector.ScreencastApp._instance()._toggleButton; | 125 return WebInspector.ScreencastApp._instance()._toggleButton; |
| 132 } | 126 } |
| 133 } | 127 } |
| 134 | 128 |
| 135 | |
| 136 /** | |
| 137 * @constructor | |
| 138 * @implements {WebInspector.ActionDelegate} | |
| 139 */ | |
| 140 WebInspector.ScreencastApp.ActionDelegate = function() | |
| 141 { | |
| 142 }; | |
| 143 | |
| 144 WebInspector.ScreencastApp.ActionDelegate.prototype = { | |
| 145 /** | |
| 146 * @override | |
| 147 * @param {!WebInspector.Context} context | |
| 148 * @param {string} actionId | |
| 149 * @return {boolean} | |
| 150 */ | |
| 151 handleAction: function(context, actionId) | |
| 152 { | |
| 153 if (actionId === "screencast.request-app-banner") { | |
| 154 WebInspector.ScreencastApp._instance()._requestAppBanner() | |
| 155 return true; | |
| 156 } | |
| 157 return false; | |
| 158 } | |
| 159 }; | |
| 160 | |
| 161 | |
| 162 /** | 129 /** |
| 163 * @constructor | 130 * @constructor |
| 164 * @implements {WebInspector.AppProvider} | 131 * @implements {WebInspector.AppProvider} |
| 165 */ | 132 */ |
| 166 WebInspector.ScreencastAppProvider = function() | 133 WebInspector.ScreencastAppProvider = function() |
| 167 { | 134 { |
| 168 }; | 135 }; |
| 169 | 136 |
| 170 WebInspector.ScreencastAppProvider.prototype = { | 137 WebInspector.ScreencastAppProvider.prototype = { |
| 171 /** | 138 /** |
| 172 * @override | 139 * @override |
| 173 * @return {!WebInspector.App} | 140 * @return {!WebInspector.App} |
| 174 */ | 141 */ |
| 175 createApp: function() | 142 createApp: function() |
| 176 { | 143 { |
| 177 return WebInspector.ScreencastApp._instance(); | 144 return WebInspector.ScreencastApp._instance(); |
| 178 } | 145 } |
| 179 }; | 146 }; |
| OLD | NEW |