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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js

Issue 1569893003: Add "Request app banner" context menu in DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on https://codereview.chromium.org/1571633002/ Created 4 years, 11 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/sources/NavigatorView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js b/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
index ef57dd3eaa15b750c4493f891d968aa14014a4be..ee4b71b775afb7c0e9feae307977fc92bcd3cdc4 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
@@ -494,7 +494,10 @@ WebInspector.NavigatorView.prototype = {
contextMenu.show();
},
-
+ _openAppBanner: function(agent)
+ {
+ agent.openAppBanner();
+ },
/**
* @param {!Event} event
* @param {!WebInspector.NavigatorFolderTreeNode} node
@@ -505,7 +508,12 @@ WebInspector.NavigatorView.prototype = {
var project = node._project;
var contextMenu = new WebInspector.ContextMenu(event);
-
+ if (node.parent.isRoot()) {
+ var target = WebInspector.NetworkProject.targetForProject(project);
+ if (target.isPage()) {
+ contextMenu.appendItem(WebInspector.UIString.capitalize("Open app banner"), this._openAppBanner.bind(this, target.pageAgent()));
pfeldman 2016/01/14 04:43:05 I think this item should go into the device mode t
horo 2016/01/15 10:00:22 Implemented in DeviceModeView. But I think DeviceM
+ }
+ }
if (project && project.type() === WebInspector.projectTypes.FileSystem) {
contextMenu.appendItem(WebInspector.UIString.capitalize("Refresh"), this._handleContextMenuRefresh.bind(this, project, path));
if (node instanceof WebInspector.NavigatorFolderTreeNode) {

Powered by Google App Engine
This is Rietveld 408576698