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