Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Side by Side Diff: Source/devtools/front_end/main/ScreencastApp.js

Issue 675753002: [DevTools] Drop "ui" module from toolbox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/main/Main.js ('k') | Source/devtools/front_end/main/SimpleApp.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * @implements {WebInspector.TargetManager.Observer} 8 * @implements {WebInspector.TargetManager.Observer}
9 */ 9 */
10 WebInspector.ScreencastApp = function() 10 WebInspector.ScreencastApp = function()
11 { 11 {
12 WebInspector.App.call(this); 12 WebInspector.App.call(this);
13 13
14 var lastScreencastState = WebInspector.settings.createSetting("lastScreencas tState", "left"); 14 var lastScreencastState = WebInspector.settings.createSetting("lastScreencas tState", "left");
15 this._currentScreencastState = WebInspector.settings.createSetting("currentS creencastState", "disabled"); 15 this._currentScreencastState = WebInspector.settings.createSetting("currentS creencastState", "disabled");
16 this._toggleScreencastButton = new WebInspector.StatusBarStatesSettingButton ( 16 this._toggleScreencastButton = new WebInspector.StatusBarStatesSettingButton (
17 "screencast-status-bar-item", 17 "screencast-status-bar-item",
18 ["disabled", "left", "top"], 18 ["disabled", "left", "top"],
19 [WebInspector.UIString("Disable screencast."), WebInspector.UIString("Sw itch to portrait screencast."), WebInspector.UIString("Switch to landscape scree ncast.")], 19 [WebInspector.UIString("Disable screencast."), WebInspector.UIString("Sw itch to portrait screencast."), WebInspector.UIString("Switch to landscape scree ncast.")],
20 this._currentScreencastState.get(), 20 this._currentScreencastState.get(),
21 this._currentScreencastState, 21 this._currentScreencastState,
22 lastScreencastState, 22 lastScreencastState,
23 this._onStatusBarButtonStateChanged.bind(this)); 23 this._onStatusBarButtonStateChanged.bind(this));
24 WebInspector.targetManager.observeTargets(this); 24 WebInspector.targetManager.observeTargets(this);
25 }; 25 };
26 26
27 WebInspector.ScreencastApp.prototype = { 27 WebInspector.ScreencastApp.prototype = {
28 presentUI: function() 28 /**
29 * @param {!Document} document
30 * @override
31 */
32 presentUI: function(document)
29 { 33 {
30 var rootView = new WebInspector.RootView(); 34 var rootView = new WebInspector.RootView();
31 35
32 this._rootSplitView = new WebInspector.SplitView(false, true, "Inspector View.screencastSplitViewState", 300, 300); 36 this._rootSplitView = new WebInspector.SplitView(false, true, "Inspector View.screencastSplitViewState", 300, 300);
33 this._rootSplitView.show(rootView.element); 37 this._rootSplitView.show(rootView.element);
34 this._rootSplitView.hideMain(); 38 this._rootSplitView.hideMain();
35 39
36 WebInspector.inspectorView.show(this._rootSplitView.sidebarElement()); 40 WebInspector.inspectorView.show(this._rootSplitView.sidebarElement());
37 WebInspector.inspectorView.showInitialPanel(); 41 WebInspector.inspectorView.showInitialPanel();
38 rootView.attachToBody(); 42 rootView.attachToDocument(document);
39 }, 43 },
40 44
41 /** 45 /**
42 * @param {!WebInspector.Target} target 46 * @param {!WebInspector.Target} target
43 */ 47 */
44 targetAdded: function(target) 48 targetAdded: function(target)
45 { 49 {
46 if (this._target) 50 if (this._target)
47 return; 51 return;
48 this._target = target; 52 this._target = target;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 /** 113 /**
110 * @return {?WebInspector.StatusBarItem} 114 * @return {?WebInspector.StatusBarItem}
111 */ 115 */
112 item: function() 116 item: function()
113 { 117 {
114 if (!(WebInspector.app instanceof WebInspector.ScreencastApp)) 118 if (!(WebInspector.app instanceof WebInspector.ScreencastApp))
115 return null; 119 return null;
116 return /** @type {!WebInspector.ScreencastApp} */ (WebInspector.app)._to ggleScreencastButton; 120 return /** @type {!WebInspector.ScreencastApp} */ (WebInspector.app)._to ggleScreencastButton;
117 } 121 }
118 } 122 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/main/Main.js ('k') | Source/devtools/front_end/main/SimpleApp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698