| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/extensions/hosted_app_browser_controller.h" | 5 #include "chrome/browser/ui/extensions/hosted_app_browser_controller.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ssl/connection_security.h" | 9 #include "chrome/browser/ssl/connection_security.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/browser/ui/browser_window.h" | 11 #include "chrome/browser/ui/browser_window.h" |
| 12 #include "chrome/browser/ui/host_desktop.h" | |
| 13 #include "chrome/browser/ui/location_bar/location_bar.h" | 12 #include "chrome/browser/ui/location_bar/location_bar.h" |
| 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 15 #include "chrome/browser/web_applications/web_app.h" | 14 #include "chrome/browser/web_applications/web_app.h" |
| 16 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 17 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" | 16 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" |
| 18 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
| 19 #include "extensions/browser/extension_registry.h" | 18 #include "extensions/browser/extension_registry.h" |
| 20 #include "extensions/common/extension.h" | 19 #include "extensions/common/extension.h" |
| 21 #include "net/base/net_util.h" | 20 #include "net/base/net_util.h" |
| 21 #include "ui/gfx/host_desktop_type.h" |
| 22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
| 23 | 23 |
| 24 namespace extensions { | 24 namespace extensions { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 bool IsSameOriginOrMoreSecure(const GURL& app_url, const GURL& page_url) { | 28 bool IsSameOriginOrMoreSecure(const GURL& app_url, const GURL& page_url) { |
| 29 const std::string www("www."); | 29 const std::string www("www."); |
| 30 return (app_url.scheme() == page_url.scheme() || | 30 return (app_url.scheme() == page_url.scheme() || |
| 31 page_url.scheme() == url::kHttpsScheme) && | 31 page_url.scheme() == url::kHttpsScheme) && |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 void HostedAppBrowserController::UpdateLocationBarVisibility( | 107 void HostedAppBrowserController::UpdateLocationBarVisibility( |
| 108 bool animate) const { | 108 bool animate) const { |
| 109 if (!SupportsLocationBar()) | 109 if (!SupportsLocationBar()) |
| 110 return; | 110 return; |
| 111 | 111 |
| 112 browser_->window()->GetLocationBar()->UpdateLocationBarVisibility( | 112 browser_->window()->GetLocationBar()->UpdateLocationBarVisibility( |
| 113 ShouldShowLocationBar(), animate); | 113 ShouldShowLocationBar(), animate); |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace extensions | 116 } // namespace extensions |
| OLD | NEW |