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

Side by Side Diff: Source/devtools/front_end/ScreencastView.js

Issue 197823010: [DevTools] Add minimum size to WebInspector.View. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@splitdip2
Patch Set: fixed comments Created 6 years, 9 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
« no previous file with comments | « Source/devtools/front_end/Panel.js ('k') | Source/devtools/front_end/Settings.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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 18 matching lines...) Expand all
29 */ 29 */
30 30
31 /** 31 /**
32 * @constructor 32 * @constructor
33 * @extends {WebInspector.VBox} 33 * @extends {WebInspector.VBox}
34 * @implements {WebInspector.DOMNodeHighlighter} 34 * @implements {WebInspector.DOMNodeHighlighter}
35 */ 35 */
36 WebInspector.ScreencastView = function() 36 WebInspector.ScreencastView = function()
37 { 37 {
38 WebInspector.VBox.call(this); 38 WebInspector.VBox.call(this);
39 this.setMinimumSize(150, 150);
39 this.registerRequiredCSS("screencastView.css"); 40 this.registerRequiredCSS("screencastView.css");
40 }; 41 };
41 42
42 WebInspector.ScreencastView._bordersSize = 40; 43 WebInspector.ScreencastView._bordersSize = 40;
43 44
44 WebInspector.ScreencastView._navBarHeight = 29; 45 WebInspector.ScreencastView._navBarHeight = 29;
45 46
46 WebInspector.ScreencastView._HttpRegex = /^https?:\/\/(.+)/; 47 WebInspector.ScreencastView._HttpRegex = /^https?:\/\/(.+)/;
47 48
48 WebInspector.ScreencastView.Constraints = {
49 Width: 150,
50 Height: 150
51 };
52
53 WebInspector.ScreencastView.prototype = { 49 WebInspector.ScreencastView.prototype = {
54 initialize: function() 50 initialize: function()
55 { 51 {
56 this.element.classList.add("screencast"); 52 this.element.classList.add("screencast");
57 53
58 this._createNavigationBar(); 54 this._createNavigationBar();
59 55
60 this._viewportElement = this.element.createChild("div", "screencast-view port hidden"); 56 this._viewportElement = this.element.createChild("div", "screencast-view port hidden");
61 this._glassPaneElement = this.element.createChild("div", "screencast-gla sspane hidden"); 57 this._glassPaneElement = this.element.createChild("div", "screencast-gla sspane hidden");
62 58
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 917
922 /** 918 /**
923 * @constructor 919 * @constructor
924 */ 920 */
925 WebInspector.ScreencastController = function() 921 WebInspector.ScreencastController = function()
926 { 922 {
927 var rootView = new WebInspector.RootView(); 923 var rootView = new WebInspector.RootView();
928 924
929 this._rootSplitView = new WebInspector.SplitView(false, true, "InspectorView .screencastSplitViewState", 300, 300); 925 this._rootSplitView = new WebInspector.SplitView(false, true, "InspectorView .screencastSplitViewState", 300, 300);
930 this._rootSplitView.show(rootView.element); 926 this._rootSplitView.show(rootView.element);
931 this._rootSplitView.setSidebarElementConstraints(180, 50);
932 this._rootSplitView.setMainElementConstraints(WebInspector.ScreencastView.Co nstraints.Width, WebInspector.ScreencastView.Constraints.Height);
933 927
934 WebInspector.inspectorView.show(this._rootSplitView.sidebarElement()); 928 WebInspector.inspectorView.show(this._rootSplitView.sidebarElement());
935 this._screencastView = new WebInspector.ScreencastView(); 929 this._screencastView = new WebInspector.ScreencastView();
936 this._screencastView.show(this._rootSplitView.mainElement()); 930 this._screencastView.show(this._rootSplitView.mainElement());
937 931
938 this._onStatusBarButtonStateChanged("disabled"); 932 this._onStatusBarButtonStateChanged("disabled");
939 rootView.show(document.body); 933 rootView.attachToBody();
940 934
941 this._initialized = false; 935 this._initialized = false;
942 }; 936 };
943 937
944 WebInspector.ScreencastController.prototype = { 938 WebInspector.ScreencastController.prototype = {
945 /** 939 /**
946 * @param {string} state 940 * @param {string} state
947 */ 941 */
948 _onStatusBarButtonStateChanged: function(state) 942 _onStatusBarButtonStateChanged: function(state)
949 { 943 {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 * @return {!Element} 982 * @return {!Element}
989 */ 983 */
990 statusBarItem: function() 984 statusBarItem: function()
991 { 985 {
992 if (this._initialized) 986 if (this._initialized)
993 return this._toggleScreencastButton.element; 987 return this._toggleScreencastButton.element;
994 this._statusBarPlaceholder = document.createElement("div"); 988 this._statusBarPlaceholder = document.createElement("div");
995 return this._statusBarPlaceholder; 989 return this._statusBarPlaceholder;
996 } 990 }
997 }; 991 };
OLDNEW
« no previous file with comments | « Source/devtools/front_end/Panel.js ('k') | Source/devtools/front_end/Settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698