| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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 } | 
| OLD | NEW | 
|---|