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

Unified Diff: third_party/WebKit/Source/devtools/front_end/main/RequestAppBannerActionDelegate.js

Issue 2851913002: [DevTools] Do not expose agents on Target
Patch Set: storage and tests.js Created 3 years, 8 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/main/RequestAppBannerActionDelegate.js
diff --git a/third_party/WebKit/Source/devtools/front_end/main/RequestAppBannerActionDelegate.js b/third_party/WebKit/Source/devtools/front_end/main/RequestAppBannerActionDelegate.js
index 5b2779f53b8568cb10878af78e75e0c1bd5cc45d..64299e1571c30556a29267008c7eac41b7b301e6 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/RequestAppBannerActionDelegate.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/RequestAppBannerActionDelegate.js
@@ -13,9 +13,9 @@ Main.RequestAppBannerActionDelegate = class {
* @return {boolean}
*/
handleAction(context, actionId) {
- var target = SDK.targetManager.mainTarget();
- if (target && target.hasBrowserCapability()) {
- target.pageAgent().requestAppBanner();
+ var resourceTreeModel = SDK.targetManager.models(SDK.ResourceTreeModel)[0];
+ if (resourceTreeModel) {
+ resourceTreeModel.requestAppBanner();
Common.console.show();
}
return true;

Powered by Google App Engine
This is Rietveld 408576698