Commit a1bdf9ab authored by apavlov@chromium.org's avatar apavlov@chromium.org

DevTools: Fix remote device debugging

R=dgozman
BUG=381184

Review URL: https://codereview.chromium.org/322483004

git-svn-id: svn://svn.chromium.org/blink/trunk@175669 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 3b7d9e9d
...@@ -10,14 +10,14 @@ WebInspector.ScreencastApp = function() ...@@ -10,14 +10,14 @@ WebInspector.ScreencastApp = function()
{ {
WebInspector.App.call(this); WebInspector.App.call(this);
var currentScreencastState = WebInspector.settings.createSetting("currentScreencastState", ""); var lastScreencastState = WebInspector.settings.createSetting("lastScreencastState", "left");
var lastScreencastState = WebInspector.settings.createSetting("lastScreencastState", ""); this._currentScreencastState = WebInspector.settings.createSetting("currentScreencastState", "disabled");
this._toggleScreencastButton = new WebInspector.StatusBarStatesSettingButton( this._toggleScreencastButton = new WebInspector.StatusBarStatesSettingButton(
"screencast-status-bar-item", "screencast-status-bar-item",
["disabled", "left", "top"], ["disabled", "left", "top"],
[WebInspector.UIString("Disable screencast."), WebInspector.UIString("Switch to portrait screencast."), WebInspector.UIString("Switch to landscape screencast.")], [WebInspector.UIString("Disable screencast."), WebInspector.UIString("Switch to portrait screencast."), WebInspector.UIString("Switch to landscape screencast.")],
currentScreencastState.get(), this._currentScreencastState.get(),
currentScreencastState, this._currentScreencastState,
lastScreencastState, lastScreencastState,
this._onStatusBarButtonStateChanged.bind(this)); this._onStatusBarButtonStateChanged.bind(this));
}; };
...@@ -35,7 +35,7 @@ WebInspector.ScreencastApp.prototype = { ...@@ -35,7 +35,7 @@ WebInspector.ScreencastApp.prototype = {
this._screencastView = new WebInspector.ScreencastView(target); this._screencastView = new WebInspector.ScreencastView(target);
this._screencastView.show(this._rootSplitView.mainElement()); this._screencastView.show(this._rootSplitView.mainElement());
this._onStatusBarButtonStateChanged("disabled"); this._onStatusBarButtonStateChanged(this._currentScreencastState.get());
rootView.attachToBody(); rootView.attachToBody();
}, },
...@@ -50,6 +50,8 @@ WebInspector.ScreencastApp.prototype = { ...@@ -50,6 +50,8 @@ WebInspector.ScreencastApp.prototype = {
*/ */
_onStatusBarButtonStateChanged: function(state) _onStatusBarButtonStateChanged: function(state)
{ {
if (!this._rootSplitView)
return;
if (state === "disabled") { if (state === "disabled") {
this._rootSplitView.toggleResizer(this._rootSplitView.resizerElement(), false); this._rootSplitView.toggleResizer(this._rootSplitView.resizerElement(), false);
this._rootSplitView.toggleResizer(WebInspector.inspectorView.topResizerElement(), false); this._rootSplitView.toggleResizer(WebInspector.inspectorView.topResizerElement(), false);
......
...@@ -131,6 +131,11 @@ ...@@ -131,6 +131,11 @@
"className": "WebInspector.DockController.ButtonProvider", "className": "WebInspector.DockController.ButtonProvider",
"location": "toolbar-right" "location": "toolbar-right"
}, },
{
"type": "@WebInspector.StatusBarButton.Provider",
"className": "WebInspector.ScreencastApp.StatusBarButtonProvider",
"location": "toolbar-right"
},
{ {
"type": "ui-setting", "type": "ui-setting",
"title": "Disable cache (while DevTools is open)", "title": "Disable cache (while DevTools is open)",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment