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

Unified Diff: Source/devtools/front_end/main/ScreencastApp.js

Issue 322483004: DevTools: Fix remote device debugging (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make "left" the default screencast location value Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/devtools/front_end/main/module.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/main/ScreencastApp.js
diff --git a/Source/devtools/front_end/main/ScreencastApp.js b/Source/devtools/front_end/main/ScreencastApp.js
index 3377344b6249171d317c79bd78fb9346b0b0ecbc..eb348b837e45611d40f7f98b32c1ee32453d01e4 100644
--- a/Source/devtools/front_end/main/ScreencastApp.js
+++ b/Source/devtools/front_end/main/ScreencastApp.js
@@ -10,14 +10,14 @@ WebInspector.ScreencastApp = function()
{
WebInspector.App.call(this);
- var currentScreencastState = WebInspector.settings.createSetting("currentScreencastState", "");
- var lastScreencastState = WebInspector.settings.createSetting("lastScreencastState", "");
+ var lastScreencastState = WebInspector.settings.createSetting("lastScreencastState", "left");
+ this._currentScreencastState = WebInspector.settings.createSetting("currentScreencastState", "disabled");
this._toggleScreencastButton = new WebInspector.StatusBarStatesSettingButton(
"screencast-status-bar-item",
["disabled", "left", "top"],
[WebInspector.UIString("Disable screencast."), WebInspector.UIString("Switch to portrait screencast."), WebInspector.UIString("Switch to landscape screencast.")],
- currentScreencastState.get(),
- currentScreencastState,
+ this._currentScreencastState.get(),
+ this._currentScreencastState,
lastScreencastState,
this._onStatusBarButtonStateChanged.bind(this));
};
@@ -35,7 +35,7 @@ WebInspector.ScreencastApp.prototype = {
this._screencastView = new WebInspector.ScreencastView(target);
this._screencastView.show(this._rootSplitView.mainElement());
- this._onStatusBarButtonStateChanged("disabled");
+ this._onStatusBarButtonStateChanged(this._currentScreencastState.get());
rootView.attachToBody();
},
@@ -50,6 +50,8 @@ WebInspector.ScreencastApp.prototype = {
*/
_onStatusBarButtonStateChanged: function(state)
{
+ if (!this._rootSplitView)
+ return;
if (state === "disabled") {
this._rootSplitView.toggleResizer(this._rootSplitView.resizerElement(), false);
this._rootSplitView.toggleResizer(WebInspector.inspectorView.topResizerElement(), false);
« no previous file with comments | « no previous file | Source/devtools/front_end/main/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698