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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 441803004: Introduce new WebApp header style for hosted apps and fizzy apps on ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Put some non-ash code back Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 } 2283 }
2284 } 2284 }
2285 2285
2286 bool Browser::ShouldShowLocationBar() const { 2286 bool Browser::ShouldShowLocationBar() const {
2287 // Tabbed browser always show a location bar. 2287 // Tabbed browser always show a location bar.
2288 if (is_type_tabbed()) 2288 if (is_type_tabbed())
2289 return true; 2289 return true;
2290 2290
2291 if (is_app()) { 2291 if (is_app()) {
2292 if (CommandLine::ForCurrentProcess()->HasSwitch( 2292 if (CommandLine::ForCurrentProcess()->HasSwitch(
2293 switches::kEnableStreamlinedHostedApps)) { 2293 switches::kEnableStreamlinedHostedApps) &&
2294 host_desktop_type() != chrome::HOST_DESKTOP_TYPE_ASH) {
2294 // If kEnableStreamlinedHostedApps is true, show the location bar for 2295 // If kEnableStreamlinedHostedApps is true, show the location bar for
2295 // bookmark apps. 2296 // bookmark apps, except on ash which has the toolbar merged into the
2297 // frame.
2296 ExtensionService* service = 2298 ExtensionService* service =
2297 extensions::ExtensionSystem::Get(profile_)->extension_service(); 2299 extensions::ExtensionSystem::Get(profile_)->extension_service();
2298 const extensions::Extension* extension = 2300 const extensions::Extension* extension =
2299 service ? service->GetInstalledExtension( 2301 service ? service->GetInstalledExtension(
2300 web_app::GetExtensionIdFromApplicationName(app_name())) 2302 web_app::GetExtensionIdFromApplicationName(app_name()))
2301 : NULL; 2303 : NULL;
2302 return (!extension || extension->from_bookmark()) && 2304 return (!extension || extension->from_bookmark()) &&
2303 app_name() != DevToolsWindow::kDevToolsApp; 2305 app_name() != DevToolsWindow::kDevToolsApp;
2304 } else { 2306 } else {
2305 return false; 2307 return false;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2459 if (contents && !allow_js_access) { 2461 if (contents && !allow_js_access) {
2460 contents->web_contents()->GetController().LoadURL( 2462 contents->web_contents()->GetController().LoadURL(
2461 target_url, 2463 target_url,
2462 content::Referrer(), 2464 content::Referrer(),
2463 content::PAGE_TRANSITION_LINK, 2465 content::PAGE_TRANSITION_LINK,
2464 std::string()); // No extra headers. 2466 std::string()); // No extra headers.
2465 } 2467 }
2466 2468
2467 return contents != NULL; 2469 return contents != NULL;
2468 } 2470 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698