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

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

Issue 1200903003: [DevTools] Pass screen size and position to setDeviceMetricsOverrides. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « Source/devtools/front_end/emulation/OverridesView.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * @implements {WebInspector.TargetManager.Observer} 9 * @implements {WebInspector.TargetManager.Observer}
10 * @param {!WebInspector.InspectedPagePlaceholder} inspectedPagePlaceholder 10 * @param {!WebInspector.InspectedPagePlaceholder} inspectedPagePlaceholder
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 _createDeviceSection: function() 611 _createDeviceSection: function()
612 { 612 {
613 var deviceSection = this._toolbarElement.createChild("div", "responsive- design-section responsive-design-section-device"); 613 var deviceSection = this._toolbarElement.createChild("div", "responsive- design-section responsive-design-section-device");
614 deviceSection.createChild("div", "responsive-design-section-decorator"); 614 deviceSection.createChild("div", "responsive-design-section-decorator");
615 615
616 // Device. 616 // Device.
617 var deviceElement = deviceSection.createChild("div", "responsive-design- suite responsive-design-suite-top").createChild("div"); 617 var deviceElement = deviceSection.createChild("div", "responsive-design- suite responsive-design-suite-top").createChild("div");
618 618
619 var fieldsetElement = deviceElement.createChild("fieldset"); 619 var fieldsetElement = deviceElement.createChild("fieldset");
620 fieldsetElement.createChild("label").textContent = WebInspector.UIString ("Device"); 620 fieldsetElement.createChild("label").textContent = WebInspector.UIString ("Device");
621 var deviceSelect = new WebInspector.DeviceSelect(createElementWithClass( "button", "responsive-design-icon responsive-design-icon-swap")); 621 var deviceSelect = new WebInspector.DeviceSelect(createElementWithClass( "button", "responsive-design-icon responsive-design-icon-swap"), this._deviceMod eSelected.bind(this));
622 deviceSelect.setCallback(this._deviceModeSelected.bind(this));
623 fieldsetElement.appendChild(deviceSelect.element); 622 fieldsetElement.appendChild(deviceSelect.element);
624 deviceSelect.element.classList.add("responsive-design-device-select"); 623 deviceSelect.element.classList.add("responsive-design-device-select");
625 624
626 var detailsElement = deviceSection.createChild("div", "responsive-design -suite"); 625 var detailsElement = deviceSection.createChild("div", "responsive-design -suite");
627 626
628 // Dimensions. 627 // Dimensions.
629 var screenElement = detailsElement.createChild("div", ""); 628 var screenElement = detailsElement.createChild("div", "");
630 fieldsetElement = screenElement.createChild("fieldset"); 629 fieldsetElement = screenElement.createChild("fieldset");
631 630
632 var emulateResolutionCheckbox = WebInspector.SettingsUI.createSettingChe ckbox("", WebInspector.overridesSupport.settings.emulateResolution, true, WebIns pector.UIString("Emulate screen resolution")); 631 var emulateResolutionCheckbox = WebInspector.SettingsUI.createSettingChe ckbox("", WebInspector.overridesSupport.settings.emulateResolution, true, WebIns pector.UIString("Emulate screen resolution"));
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 WebInspector.EmulationDispatcher.prototype = { 822 WebInspector.EmulationDispatcher.prototype = {
824 /** 823 /**
825 * @override 824 * @override
826 * @param {!EmulationAgent.Viewport=} viewport 825 * @param {!EmulationAgent.Viewport=} viewport
827 */ 826 */
828 viewportChanged: function(viewport) 827 viewportChanged: function(viewport)
829 { 828 {
830 this._responsiveDesignView._viewportChanged(viewport); 829 this._responsiveDesignView._viewportChanged(viewport);
831 } 830 }
832 } 831 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/emulation/OverridesView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698