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

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js

Issue 1650243004: [DevTools] Option to show device frames in emulation mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Positioning and context menu fixes, addressing review comments Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
index 6ff51ae00079d4066db8b8e39da074c41f6a9189..40048c0a51c18656ac73c5a8105f527fff469a77 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
@@ -235,6 +235,30 @@ WebInspector.DeviceModeModel.prototype = {
},
/**
+ * @return {string}
+ */
+ outlineImage: function()
+ {
+ return (this._device && this._mode) ? this._device.outlineImage(this._mode) : "";
+ },
+
+ /**
+ * @return {?Insets|string|null}
+ */
+ outlineInsets: function()
+ {
+ return (this._device && this._mode) ? this._device.outlineInsets(this._mode) : "";
dgozman 2016/02/09 21:15:10 I believe you have to scale insets by this._scale.
mmccoy 2016/02/10 20:06:34 It works well for all cases I tested, but is it ok
+ },
+
+ /**
+ * @return {?Object|string|null}
+ */
+ outlineDimensions: function()
+ {
+ return (this._device && this._mode) ? this._device.outlineDimensions(this._mode) : "";
+ },
+
+ /**
* @return {!WebInspector.Rect}
*/
screenRect: function()
@@ -426,7 +450,7 @@ WebInspector.DeviceModeModel.prototype = {
if (this._type === WebInspector.DeviceModeModel.Type.Device) {
var orientation = this._device.orientationByName(this._mode.orientation);
- this._fitScale = this._calculateFitScale(orientation.width, orientation.height);
+ this._calculateFitScale(orientation.width, orientation.height);
this._applyDeviceMetrics(new Size(orientation.width, orientation.height), this._mode.insets, this._scaleSetting.get(), this._device.deviceScaleFactor, this._device.mobile(), resetPageScaleFactor);
this._applyUserAgent(this._device.userAgent);
this._applyTouch(this._device.touch(), this._device.mobile());

Powered by Google App Engine
This is Rietveld 408576698