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

Unified Diff: Source/devtools/front_end/ScreencastView.js

Issue 307623003: [DevTools] Apps implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 7 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
Index: Source/devtools/front_end/ScreencastView.js
diff --git a/Source/devtools/front_end/ScreencastView.js b/Source/devtools/front_end/ScreencastView.js
index 3f346cd1828bbbb14d07c15257fa2f72ffaac3c9..b9ce7657564bb190157438104253cd0e84abde10 100644
--- a/Source/devtools/front_end/ScreencastView.js
+++ b/Source/devtools/front_end/ScreencastView.js
@@ -1020,79 +1020,3 @@ WebInspector.ScreencastView.ProgressTracker.prototype = {
this._element.style.width = (100 * progress) + "%";
}
};
-
-/**
- * @constructor
- */
-WebInspector.ScreencastController = function()
-{
- var rootView = new WebInspector.RootView();
-
- this._rootSplitView = new WebInspector.SplitView(false, true, "InspectorView.screencastSplitViewState", 300, 300);
- this._rootSplitView.show(rootView.element);
-
- WebInspector.inspectorView.show(this._rootSplitView.sidebarElement());
- var target = /** @type {!WebInspector.Target} */ (WebInspector.targetManager.activeTarget());
- this._screencastView = new WebInspector.ScreencastView(target);
- this._screencastView.show(this._rootSplitView.mainElement());
-
- this._onStatusBarButtonStateChanged("disabled");
- rootView.attachToBody();
-
- this._initialized = false;
-};
-
-WebInspector.ScreencastController.prototype = {
- /**
- * @param {string} state
- */
- _onStatusBarButtonStateChanged: function(state)
- {
- if (state === "disabled") {
- this._rootSplitView.toggleResizer(this._rootSplitView.resizerElement(), false);
- this._rootSplitView.toggleResizer(WebInspector.inspectorView.topResizerElement(), false);
- this._rootSplitView.hideMain();
- return;
- }
-
- this._rootSplitView.setVertical(state === "left");
- this._rootSplitView.setSecondIsSidebar(true);
- this._rootSplitView.toggleResizer(this._rootSplitView.resizerElement(), true);
- this._rootSplitView.toggleResizer(WebInspector.inspectorView.topResizerElement(), state === "top");
- this._rootSplitView.showBoth();
- },
-
- initialize: function()
- {
- this._screencastView.initialize();
-
- this._currentScreencastState = WebInspector.settings.createSetting("currentScreencastState", "");
- this._lastScreencastState = WebInspector.settings.createSetting("lastScreencastState", "");
- 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.")],
- this._currentScreencastState,
- this._lastScreencastState,
- this._onStatusBarButtonStateChanged.bind(this));
-
- if (this._statusBarPlaceholder) {
- this._statusBarPlaceholder.parentElement.insertBefore(this._toggleScreencastButton.element, this._statusBarPlaceholder);
- this._statusBarPlaceholder.parentElement.removeChild(this._statusBarPlaceholder);
- delete this._statusBarPlaceholder;
- }
-
- this._initialized = true;
- },
-
- /**
- * @return {!Element}
- */
- statusBarItem: function()
- {
- if (this._initialized)
- return this._toggleScreencastButton.element;
- this._statusBarPlaceholder = document.createElement("div");
- return this._statusBarPlaceholder;
- }
-};

Powered by Google App Engine
This is Rietveld 408576698