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

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: Rebase 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 2282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 } 2293 }
2294 } 2294 }
2295 2295
2296 bool Browser::ShouldShowLocationBar() const { 2296 bool Browser::ShouldShowLocationBar() const {
2297 // Tabbed browser always show a location bar. 2297 // Tabbed browser always show a location bar.
2298 if (is_type_tabbed()) 2298 if (is_type_tabbed())
2299 return true; 2299 return true;
2300 2300
2301 if (is_app()) { 2301 if (is_app()) {
2302 if (CommandLine::ForCurrentProcess()->HasSwitch( 2302 if (CommandLine::ForCurrentProcess()->HasSwitch(
2303 switches::kEnableStreamlinedHostedApps)) { 2303 switches::kEnableStreamlinedHostedApps) &&
2304 host_desktop_type() != chrome::HOST_DESKTOP_TYPE_ASH) {
2304 // If kEnableStreamlinedHostedApps is true, show the location bar for 2305 // If kEnableStreamlinedHostedApps is true, show the location bar for
2305 // bookmark apps. 2306 // bookmark apps, except on ash which has the toolbar merged into the
2307 // frame.
2306 ExtensionService* service = 2308 ExtensionService* service =
2307 extensions::ExtensionSystem::Get(profile_)->extension_service(); 2309 extensions::ExtensionSystem::Get(profile_)->extension_service();
2308 const extensions::Extension* extension = 2310 const extensions::Extension* extension =
2309 service ? service->GetInstalledExtension( 2311 service ? service->GetInstalledExtension(
2310 web_app::GetExtensionIdFromApplicationName(app_name())) 2312 web_app::GetExtensionIdFromApplicationName(app_name()))
2311 : NULL; 2313 : NULL;
2312 return (!extension || extension->from_bookmark()) && 2314 return (!extension || extension->from_bookmark()) &&
2313 app_name() != DevToolsWindow::kDevToolsApp; 2315 app_name() != DevToolsWindow::kDevToolsApp;
2314 } else { 2316 } else {
2315 return false; 2317 return false;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2469 if (contents && !allow_js_access) { 2471 if (contents && !allow_js_access) {
2470 contents->web_contents()->GetController().LoadURL( 2472 contents->web_contents()->GetController().LoadURL(
2471 target_url, 2473 target_url,
2472 content::Referrer(), 2474 content::Referrer(),
2473 content::PAGE_TRANSITION_LINK, 2475 content::PAGE_TRANSITION_LINK,
2474 std::string()); // No extra headers. 2476 std::string()); // No extra headers.
2475 } 2477 }
2476 2478
2477 return contents != NULL; 2479 return contents != NULL;
2478 } 2480 }
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_frame_view.cc ('k') | chrome/browser/ui/views/frame/browser_header_painter_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698