| 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 * @implements {Common.App} | 5 * @implements {Common.App} |
| 6 * @implements {SDK.TargetManager.Observer} | 6 * @implements {SDK.TargetManager.Observer} |
| 7 * @unrestricted | 7 * @unrestricted |
| 8 */ | 8 */ |
| 9 Screencast.ScreencastApp = class { | 9 Screencast.ScreencastApp = class { |
| 10 constructor() { | 10 constructor() { |
| 11 this._enabledSetting = Common.settings.createSetting('screencastEnabled', tr
ue); | 11 this._enabledSetting = Common.settings.createSetting('screencastEnabled', tr
ue); |
| 12 this._toggleButton = new UI.ToolbarToggle(Common.UIString('Toggle screencast
'), 'largeicon-phone'); | 12 this._toggleButton = new UI.ToolbarToggle(Common.UIString('Toggle screencast
'), 'largeicon-phone'); |
| 13 this._toggleButton.setToggled(this._enabledSetting.get()); | 13 this._toggleButton.setToggled(this._enabledSetting.get()); |
| 14 this._toggleButton.addEventListener(UI.ToolbarButton.Events.Click, this._tog
gleButtonClicked, this); | 14 this._toggleButton.addEventListener('click', this._toggleButtonClicked, this
); |
| 15 SDK.targetManager.observeTargets(this); | 15 SDK.targetManager.observeTargets(this); |
| 16 } | 16 } |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * @return {!Screencast.ScreencastApp} | 19 * @return {!Screencast.ScreencastApp} |
| 20 */ | 20 */ |
| 21 static _instance() { | 21 static _instance() { |
| 22 if (!Screencast.ScreencastApp._appInstance) | 22 if (!Screencast.ScreencastApp._appInstance) |
| 23 Screencast.ScreencastApp._appInstance = new Screencast.ScreencastApp(); | 23 Screencast.ScreencastApp._appInstance = new Screencast.ScreencastApp(); |
| 24 return Screencast.ScreencastApp._appInstance; | 24 return Screencast.ScreencastApp._appInstance; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 */ | 119 */ |
| 120 Screencast.ScreencastAppProvider = class { | 120 Screencast.ScreencastAppProvider = class { |
| 121 /** | 121 /** |
| 122 * @override | 122 * @override |
| 123 * @return {!Common.App} | 123 * @return {!Common.App} |
| 124 */ | 124 */ |
| 125 createApp() { | 125 createApp() { |
| 126 return Screencast.ScreencastApp._instance(); | 126 return Screencast.ScreencastApp._instance(); |
| 127 } | 127 } |
| 128 }; | 128 }; |
| OLD | NEW |