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

Side by Side Diff: Source/devtools/front_end/emulation/OverridesView.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 _createDeviceElement: function() 194 _createDeviceElement: function()
195 { 195 {
196 var fieldsetElement = createElement("fieldset"); 196 var fieldsetElement = createElement("fieldset");
197 fieldsetElement.id = "metrics-override-section"; 197 fieldsetElement.id = "metrics-override-section";
198 198
199 var deviceModelElement = fieldsetElement.createChild("p", "overrides-dev ice-model-section"); 199 var deviceModelElement = fieldsetElement.createChild("p", "overrides-dev ice-model-section");
200 deviceModelElement.createChild("span").textContent = WebInspector.UIStri ng("Model:"); 200 deviceModelElement.createChild("span").textContent = WebInspector.UIStri ng("Model:");
201 201
202 var rotateButton = createElement("button"); 202 var rotateButton = createElement("button");
203 rotateButton.textContent = " \u21C4 "; 203 rotateButton.textContent = " \u21C4 ";
204 var deviceSelect = new WebInspector.DeviceSelect(rotateButton); 204 var deviceSelect = new WebInspector.DeviceSelect(rotateButton, null);
205 deviceModelElement.appendChild(deviceSelect.element); 205 deviceModelElement.appendChild(deviceSelect.element);
206 206
207 var emulateResolutionCheckbox = WebInspector.SettingsUI.createSettingChe ckbox(WebInspector.UIString("Emulate screen resolution"), WebInspector.overrides Support.settings.emulateResolution, true); 207 var emulateResolutionCheckbox = WebInspector.SettingsUI.createSettingChe ckbox(WebInspector.UIString("Emulate screen resolution"), WebInspector.overrides Support.settings.emulateResolution, true);
208 fieldsetElement.appendChild(emulateResolutionCheckbox); 208 fieldsetElement.appendChild(emulateResolutionCheckbox);
209 var resolutionFieldset = WebInspector.SettingsUI.createSettingFieldset(W ebInspector.overridesSupport.settings.emulateResolution); 209 var resolutionFieldset = WebInspector.SettingsUI.createSettingFieldset(W ebInspector.overridesSupport.settings.emulateResolution);
210 fieldsetElement.appendChild(resolutionFieldset); 210 fieldsetElement.appendChild(resolutionFieldset);
211 211
212 var tableElement = resolutionFieldset.createChild("table"); 212 var tableElement = resolutionFieldset.createChild("table");
213 var rowElement = tableElement.createChild("tr"); 213 var rowElement = tableElement.createChild("tr");
214 var cellElement = rowElement.createChild("td"); 214 var cellElement = rowElement.createChild("td");
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 * @override 615 * @override
616 * @param {!Object} overridesSupport 616 * @param {!Object} overridesSupport
617 * @return {!Promise} 617 * @return {!Promise}
618 */ 618 */
619 reveal: function(overridesSupport) 619 reveal: function(overridesSupport)
620 { 620 {
621 WebInspector.inspectorView.showViewInDrawer("emulation"); 621 WebInspector.inspectorView.showViewInDrawer("emulation");
622 return Promise.resolve(); 622 return Promise.resolve();
623 } 623 }
624 } 624 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/emulation/OverridesUI.js ('k') | Source/devtools/front_end/emulation/ResponsiveDesignView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698