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

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: Rebase Created 7 years 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 | « no previous file | Source/devtools/front_end/HelpScreen.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) 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 18 matching lines...) Expand all
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)
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.devtoolsElement().createChild("div", "dra wer");
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 17 matching lines...) Expand all
67 /** 67 /**
68 * @return {!Element} 68 * @return {!Element}
69 */ 69 */
70 toggleButtonElement: function() 70 toggleButtonElement: function()
71 { 71 {
72 return this._toggleDrawerButton.element; 72 return this._toggleDrawerButton.element;
73 }, 73 },
74 74
75 _constrainHeight: function(height) 75 _constrainHeight: function(height)
76 { 76 {
77 return Number.constrain(height, Preferences.minConsoleHeight, this._insp ectorView.element.offsetHeight - Preferences.minConsoleHeight); 77 return Number.constrain(height, Preferences.minConsoleHeight, this._insp ectorView.devtoolsElement().offsetHeight - Preferences.minConsoleHeight);
78 }, 78 },
79 79
80 isHiding: function() 80 isHiding: function()
81 { 81 {
82 return this._isHiding; 82 return this._isHiding;
83 }, 83 },
84 84
85 /** 85 /**
86 * @param {string} tabId 86 * @param {string} tabId
87 * @param {string} title 87 * @param {string} title
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 return false; 311 return false;
312 312
313 this._visibleView().storeScrollPositions(); 313 this._visibleView().storeScrollPositions();
314 this._statusBarDragOffset = event.pageY - this.element.totalOffsetTop(); 314 this._statusBarDragOffset = event.pageY - this.element.totalOffsetTop();
315 return true; 315 return true;
316 }, 316 },
317 317
318 _statusBarDragging: function(event) 318 _statusBarDragging: function(event)
319 { 319 {
320 var height = window.innerHeight - event.pageY + this._statusBarDragOffse t; 320 var height = window.innerHeight - event.pageY + this._statusBarDragOffse t;
321 height = Number.constrain(height, Preferences.minConsoleHeight, this._in spectorView.element.offsetHeight - Preferences.minConsoleHeight); 321 height = Number.constrain(height, Preferences.minConsoleHeight, this._in spectorView.devtoolsElement().offsetHeight - Preferences.minConsoleHeight);
322 322
323 this.element.style.flexBasis = height + "px"; 323 this.element.style.flexBasis = height + "px";
324 if (this._inspectorView.currentPanel()) 324 if (this._inspectorView.currentPanel())
325 this._inspectorView.currentPanel().doResize(); 325 this._inspectorView.currentPanel().doResize();
326 this._tabbedPane.doResize(); 326 this._tabbedPane.doResize();
327 327
328 event.consume(true); 328 event.consume(true);
329 }, 329 },
330 330
331 _endStatusBarDragging: function(event) 331 _endStatusBarDragging: function(event)
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 }, 376 },
377 377
378 /** 378 /**
379 * @return {string} 379 * @return {string}
380 */ 380 */
381 selectedViewId: function() 381 selectedViewId: function()
382 { 382 {
383 return this._tabbedPane.selectedTabId; 383 return this._tabbedPane.selectedTabId;
384 } 384 }
385 } 385 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/HelpScreen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698