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

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

Issue 71633003: DevTools: added "overlayContents" mode, where DevTools content is placed around and underneath inse… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 14 matching lines...) Expand all
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 /** 30 /**
31 * @constructor 31 * @constructor
32 * @implements {WebInspector.ViewFactory} 32 * @implements {WebInspector.ViewFactory}
33 * @param {WebInspector.InspectorView} inspectorView 33 * @param {WebInspector.InspectorView} inspectorView
34 */ 34 */
35 WebInspector.Drawer = function(inspectorView) 35 WebInspector.Drawer = function(inspectorView)
pfeldman 2013/11/18 15:07:42 Drawer does not need to know this much about inspe
dgozman 2013/11/21 16:38:51 I will look into this later (as a follow-up).
36 { 36 {
37 this._inspectorView = inspectorView; 37 this._inspectorView = inspectorView;
38 38
39 this.element = this._inspectorView.element.createChild("div", "drawer"); 39 this.element = this._inspectorView.container().createChild("div", "drawer");
40 this.element.style.flexBasis = 0; 40 this.element.style.flexBasis = 0;
41 41
42 this._savedHeight = 200; // Default. 42 this._savedHeight = 200; // Default.
43 43
44 this._drawerContentsElement = this.element.createChild("div"); 44 this._drawerContentsElement = this.element.createChild("div");
45 this._drawerContentsElement.id = "drawer-contents"; 45 this._drawerContentsElement.id = "drawer-contents";
46 46
47 this._toggleDrawerButton = new WebInspector.StatusBarButton(WebInspector.UIS tring("Show drawer."), "console-status-bar-item"); 47 this._toggleDrawerButton = new WebInspector.StatusBarButton(WebInspector.UIS tring("Show drawer."), "console-status-bar-item");
48 this._toggleDrawerButton.addEventListener("click", this.toggle, this); 48 this._toggleDrawerButton.addEventListener("click", this.toggle, this);
49 49
(...skipping 21 matching lines...) Expand all
71 /** 71 /**
72 * @return {Element} 72 * @return {Element}
73 */ 73 */
74 toggleButtonElement: function() 74 toggleButtonElement: function()
75 { 75 {
76 return this._toggleDrawerButton.element; 76 return this._toggleDrawerButton.element;
77 }, 77 },
78 78
79 _constrainHeight: function(height) 79 _constrainHeight: function(height)
80 { 80 {
81 return Number.constrain(height, Preferences.minConsoleHeight, this._insp ectorView.element.offsetHeight - Preferences.minConsoleHeight); 81 return Number.constrain(height, Preferences.minConsoleHeight, this._insp ectorView.container().offsetHeight - Preferences.minConsoleHeight);
82 }, 82 },
83 83
84 isHiding: function() 84 isHiding: function()
85 { 85 {
86 return this._isHiding; 86 return this._isHiding;
87 }, 87 },
88 88
89 /** 89 /**
90 * @param {string} tabId 90 * @param {string} tabId
91 * @param {string} title 91 * @param {string} title
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 return false; 306 return false;
307 307
308 this._visibleView().storeScrollPositions(); 308 this._visibleView().storeScrollPositions();
309 this._statusBarDragOffset = event.pageY - this.element.totalOffsetTop(); 309 this._statusBarDragOffset = event.pageY - this.element.totalOffsetTop();
310 return true; 310 return true;
311 }, 311 },
312 312
313 _statusBarDragging: function(event) 313 _statusBarDragging: function(event)
314 { 314 {
315 var height = window.innerHeight - event.pageY + this._statusBarDragOffse t; 315 var height = window.innerHeight - event.pageY + this._statusBarDragOffse t;
316 height = Number.constrain(height, Preferences.minConsoleHeight, this._in spectorView.element.offsetHeight - Preferences.minConsoleHeight); 316 height = Number.constrain(height, Preferences.minConsoleHeight, this._in spectorView.container().offsetHeight - Preferences.minConsoleHeight);
317 317
318 this.element.style.flexBasis = height + "px"; 318 this.element.style.flexBasis = height + "px";
319 if (this._inspectorView.currentPanel()) 319 if (this._inspectorView.currentPanel())
320 this._inspectorView.currentPanel().doResize(); 320 this._inspectorView.currentPanel().doResize();
321 this._tabbedPane.doResize(); 321 this._tabbedPane.doResize();
322 322
323 event.consume(true); 323 event.consume(true);
324 }, 324 },
325 325
326 _endStatusBarDragging: function(event) 326 _endStatusBarDragging: function(event)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 }, 361 },
362 362
363 /** 363 /**
364 * @return {boolean} 364 * @return {boolean}
365 */ 365 */
366 visible: function() 366 visible: function()
367 { 367 {
368 return this._toggleDrawerButton.toggled; 368 return this._toggleDrawerButton.toggled;
369 } 369 }
370 } 370 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/HelpScreen.js » ('j') | Source/devtools/front_end/InspectorView.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698