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

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

Issue 341483004: [DevTools] Add desktop device presets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase, test fix Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 * @implements {WebInspector.OverridesSupport.PageResizer} 8 * @implements {WebInspector.OverridesSupport.PageResizer}
9 * @param {!WebInspector.InspectedPagePlaceholder} inspectedPagePlaceholder 9 * @param {!WebInspector.InspectedPagePlaceholder} inspectedPagePlaceholder
10 */ 10 */
(...skipping 10 matching lines...) Expand all
21 21
22 this._canvasContainer = new WebInspector.View(); 22 this._canvasContainer = new WebInspector.View();
23 this._canvasContainer.element.classList.add("responsive-design"); 23 this._canvasContainer.element.classList.add("responsive-design");
24 this._canvasContainer.show(this._responsiveDesignContainer.element); 24 this._canvasContainer.show(this._responsiveDesignContainer.element);
25 25
26 this._canvas = this._canvasContainer.element.createChild("canvas", "fill"); 26 this._canvas = this._canvasContainer.element.createChild("canvas", "fill");
27 27
28 this._warningMessage = this._canvasContainer.element.createChild("div", "res ponsive-design-warning hidden"); 28 this._warningMessage = this._canvasContainer.element.createChild("div", "res ponsive-design-warning hidden");
29 this._warningMessage.createChild("span"); 29 this._warningMessage.createChild("span");
30 var warningCloseButton = this._warningMessage.createChild("div", "responsive -design-warning-close"); 30 var warningCloseButton = this._warningMessage.createChild("div", "responsive -design-warning-close");
31 warningCloseButton.addEventListener("click", this._closeOverridesWarning.bin d(this)); 31 warningCloseButton.addEventListener("click", this._closeOverridesWarning.bin d(this), false);
32 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport .Events.OverridesWarningUpdated, this._overridesWarningUpdated, this); 32 WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport .Events.OverridesWarningUpdated, this._overridesWarningUpdated, this);
33 33
34 this._slidersContainer = this._canvasContainer.element.createChild("div", "v box responsive-design-sliders-container"); 34 this._slidersContainer = this._canvasContainer.element.createChild("div", "v box responsive-design-sliders-container");
35 var hbox = this._slidersContainer.createChild("div", "hbox flex-auto"); 35 var hbox = this._slidersContainer.createChild("div", "hbox flex-auto");
36 this._heightSliderContainer = this._slidersContainer.createChild("div", "hbo x responsive-design-slider-height"); 36 this._heightSliderContainer = this._slidersContainer.createChild("div", "hbo x responsive-design-slider-height");
37 this._resolutionHeightLabel = this._heightSliderContainer.createChild("div", "responsive-design-resolution-label responsive-design-resolution-height"); 37 this._resolutionHeightLabel = this._heightSliderContainer.createChild("div", "responsive-design-resolution-label responsive-design-resolution-height");
38 this._pageContainer = hbox.createChild("div", "vbox flex-auto"); 38 this._pageContainer = hbox.createChild("div", "vbox flex-auto");
39 this._widthSliderContainer = hbox.createChild("div", "vbox responsive-design -slider-width"); 39 this._widthSliderContainer = hbox.createChild("div", "vbox responsive-design -slider-width");
40 this._resolutionWidthLabel = this._widthSliderContainer.createChild("div", " responsive-design-resolution-label responsive-design-resolution-width"); 40 this._resolutionWidthLabel = this._widthSliderContainer.createChild("div", " responsive-design-resolution-label responsive-design-resolution-width");
41 41
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 }, 516 },
517 517
518 _closeOverridesWarning: function() 518 _closeOverridesWarning: function()
519 { 519 {
520 this._warningMessage.querySelector("span").textContent = ""; 520 this._warningMessage.querySelector("span").textContent = "";
521 this._warningMessage.classList.add("hidden"); 521 this._warningMessage.classList.add("hidden");
522 }, 522 },
523 523
524 __proto__: WebInspector.VBox.prototype 524 __proto__: WebInspector.VBox.prototype
525 }; 525 };
OLDNEW
« no previous file with comments | « LayoutTests/inspector/device-emulation/device-emulation-test.js ('k') | Source/devtools/front_end/sdk/OverridesSupport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698