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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc

Issue 1006273002: Show location for bookmark apps that have navigated across origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/test/data/extensions/https_app/manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
index b6e7a59fd789e0fda902ca94896e86bb02912619..cccafbccac5625f0b6451988c2893247d709f5d7 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
@@ -26,8 +26,10 @@
#include "chrome/browser/ui/views/profiles/avatar_menu_button.h"
#include "chrome/browser/ui/views/tab_icon_view.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
+#include "chrome/browser/web_applications/web_app.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/extension_registry.h"
#include "grit/theme_resources.h"
#include "ui/accessibility/ax_view_state.h"
#include "ui/aura/client/aura_constants.h"
@@ -522,8 +524,17 @@ bool BrowserNonClientFrameViewAsh::UseImmersiveLightbarHeaderStyle() const {
bool BrowserNonClientFrameViewAsh::UsePackagedAppHeaderStyle() const {
// Use the packaged app style for apps that aren't using the newer WebApp
- // style.
- return browser_view()->browser()->is_app() && !UseWebAppHeaderStyle();
+ // style, and that aren't bookmark apps.
+ if (!browser_view()->browser()->is_app() || UseWebAppHeaderStyle())
+ return false;
+
+ const std::string extension_id = web_app::GetExtensionIdFromApplicationName(
+ browser_view()->browser()->app_name());
+ const extensions::Extension* extension =
+ extensions::ExtensionRegistry::Get(browser_view()->browser()->profile())
+ ->GetExtensionById(extension_id,
+ extensions::ExtensionRegistry::EVERYTHING);
+ return !extension || !extension->from_bookmark();
}
bool BrowserNonClientFrameViewAsh::UseWebAppHeaderStyle() const {
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/test/data/extensions/https_app/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698