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

Unified Diff: chrome/browser/ui/browser.cc

Issue 8834008: Hide default context menu for platform apps. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Compile on non-Windows OS Created 9 years 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: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 4e3d14f1c59722d8280c92501770142e18220ca3..39d606eac8a7383a5fe9f817cac3a6b2e1166a97 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -581,6 +581,18 @@ bool Browser::is_app() const {
return !app_name_.empty();
}
+const Extension* Browser::GetPlatformApp() const {
+ if (is_app()) {
+ const std::string ext_id = web_app::GetExtensionIdFromApplicationName(
+ app_name_);
+ const Extension* app =
+ profile_->GetExtensionService()->GetInstalledExtension(ext_id);
+ if (app && app->is_platform_app())
+ return app;
+ }
+ return NULL;
+}
+
bool Browser::is_devtools() const {
return app_name_ == DevToolsWindow::kDevToolsApp;
}

Powered by Google App Engine
This is Rietveld 408576698