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

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: Implemented differently 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 13b80a3500f57bac37a24561f13b8a80c8595f3f..4806e5804a97724fcbb3a780edba568b0b2a8f6f 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -579,6 +579,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