Index: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js |
index 84616458b43084f32ea0aa0fc3d9bfbd0dee6080..1c0792c6166182186855c2a6964f499e84395df3 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js |
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js |
@@ -628,6 +628,7 @@ WebInspector.DeviceModeView.Toolbar.prototype = { |
contextMenu.appendCheckboxItem(WebInspector.UIString("Show media queries"), this._toggleMediaInspector.bind(this), this._showMediaInspectorSetting.get(), this._model.type() === WebInspector.DeviceModeModel.Type.None); |
contextMenu.appendCheckboxItem(WebInspector.UIString("Show rulers"), this._toggleRulers.bind(this), this._showRulersSetting.get(), this._model.type() === WebInspector.DeviceModeModel.Type.None); |
contextMenu.appendItem(WebInspector.UIString("Configure network\u2026"), this._openNetworkConfig.bind(this), false); |
+ contextMenu.appendItemsAtLocation("deviceModeMenu"); |
}, |
_toggleMediaInspector: function() |
@@ -1051,9 +1052,15 @@ WebInspector.DeviceModeView.ActionDelegate.prototype = { |
*/ |
handleAction: function(context, actionId) |
{ |
- if (actionId === "emulation.toggle-device-mode" && WebInspector.DeviceModeView._wrapperInstance) { |
- WebInspector.DeviceModeView._wrapperInstance._toggleDeviceMode(); |
- return true; |
+ if (WebInspector.DeviceModeView._wrapperInstance) { |
+ if (actionId === "emulation.toggle-device-mode") { |
+ WebInspector.DeviceModeView._wrapperInstance._toggleDeviceMode(); |
+ return true; |
+ } |
+ if (actionId === "emulation.request-app-banner") { |
+ WebInspector.DeviceModeView._wrapperInstance._requestAppBanner(); |
+ return true; |
+ } |
} |
return false; |
} |
@@ -1107,5 +1114,10 @@ WebInspector.DeviceModeView.Wrapper.prototype = { |
this._deviceModeView.toggleDeviceMode(); |
}, |
+ _requestAppBanner: function() |
+ { |
+ this._deviceModeView._model.requestAppBanner(); |
+ }, |
+ |
__proto__: WebInspector.VBox.prototype |
} |