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 0d7cd47f41e340f40b4a8b5d036798361a978d82..543d40704e83fe21c96814402572e4887a061f6d 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js |
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js |
@@ -548,6 +548,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() |
@@ -1038,13 +1039,19 @@ WebInspector.DeviceModeView.ActionDelegate.prototype = { |
*/ |
handleAction: function(context, actionId) |
{ |
- if (actionId === "emulation.toggle-device-mode" && WebInspector.DeviceModeView._wrapperInstance) { |
- WebInspector.DeviceModeView._wrapperInstance._toggleDeviceMode(); |
- return true; |
- } |
- if (actionId === "emulation.toggle-device-toolbar" && WebInspector.DeviceModeView._wrapperInstance) { |
- WebInspector.DeviceModeView._wrapperInstance._toggleDeviceToolbar(); |
- return true; |
+ if (WebInspector.DeviceModeView._wrapperInstance) { |
+ if (actionId === "emulation.toggle-device-mode") { |
+ WebInspector.DeviceModeView._wrapperInstance._toggleDeviceMode(); |
+ return true; |
+ } |
+ if (actionId === "emulation.toggle-device-toolbar") { |
+ WebInspector.DeviceModeView._wrapperInstance._toggleDeviceToolbar(); |
+ return true; |
+ } |
+ if (actionId === "emulation.open-app-banner") { |
+ WebInspector.DeviceModeView._wrapperInstance._openAppBanner(); |
+ return true; |
+ } |
} |
return false; |
} |
@@ -1082,6 +1089,11 @@ WebInspector.DeviceModeView.Wrapper.prototype = { |
this._showDeviceToolbarSetting.set(!this._showDeviceToolbarSetting.get()); |
}, |
+ _openAppBanner: function() |
+ { |
+ this._deviceModeView._model.openAppBanner(); |
+ }, |
+ |
_update: function() |
{ |
if (this._showDeviceToolbarSetting.get()) { |