| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 #include "url/gurl.h" | 197 #include "url/gurl.h" |
| 198 #include "url/origin.h" | 198 #include "url/origin.h" |
| 199 | 199 |
| 200 #if defined(OS_WIN) | 200 #if defined(OS_WIN) |
| 201 #include "base/strings/string_tokenizer.h" | 201 #include "base/strings/string_tokenizer.h" |
| 202 #include "chrome/browser/chrome_browser_main_win.h" | 202 #include "chrome/browser/chrome_browser_main_win.h" |
| 203 #include "sandbox/win/src/sandbox_policy.h" | 203 #include "sandbox/win/src/sandbox_policy.h" |
| 204 #elif defined(OS_MACOSX) | 204 #elif defined(OS_MACOSX) |
| 205 #include "chrome/browser/chrome_browser_main_mac.h" | 205 #include "chrome/browser/chrome_browser_main_mac.h" |
| 206 #elif defined(OS_CHROMEOS) | 206 #elif defined(OS_CHROMEOS) |
| 207 #include "chrome/browser/chromeos/arc/arc_auth_service.h" | 207 #include "chrome/browser/chromeos/arc/arc_session_manager.h" |
| 208 #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_de
legate.h" | 208 #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_de
legate.h" |
| 209 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" | 209 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" |
| 210 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" | 210 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" |
| 211 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 211 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
| 212 #include "chrome/browser/chromeos/chrome_interface_factory.h" | 212 #include "chrome/browser/chromeos/chrome_interface_factory.h" |
| 213 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" | 213 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" |
| 214 #include "chrome/browser/chromeos/file_manager/app_id.h" | 214 #include "chrome/browser/chromeos/file_manager/app_id.h" |
| 215 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" | 215 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" |
| 216 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" | 216 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" |
| 217 #include "chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h" | 217 #include "chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h" |
| (...skipping 2929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3147 if (handle->IsInMainFrame()) { | 3147 if (handle->IsInMainFrame()) { |
| 3148 // Add interstitial page while merge session process (cookie reconstruction | 3148 // Add interstitial page while merge session process (cookie reconstruction |
| 3149 // from OAuth2 refresh token in ChromeOS login) is still in progress while | 3149 // from OAuth2 refresh token in ChromeOS login) is still in progress while |
| 3150 // we are attempting to load a google property. | 3150 // we are attempting to load a google property. |
| 3151 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() && | 3151 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() && |
| 3152 !merge_session_throttling_utils::AreAllSessionMergedAlready() && | 3152 !merge_session_throttling_utils::AreAllSessionMergedAlready() && |
| 3153 handle->GetURL().SchemeIsHTTPOrHTTPS()) { | 3153 handle->GetURL().SchemeIsHTTPOrHTTPS()) { |
| 3154 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); | 3154 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); |
| 3155 } | 3155 } |
| 3156 | 3156 |
| 3157 const arc::ArcAuthService* auth_service = arc::ArcAuthService::Get(); | 3157 const arc::ArcSessionManager* arc_session_manager = |
| 3158 if (auth_service && auth_service->IsArcEnabled() && | 3158 arc::ArcSessionManager::Get(); |
| 3159 if (arc_session_manager && arc_session_manager->IsArcEnabled() && |
| 3159 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) { | 3160 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) { |
| 3160 prerender::PrerenderContents* prerender_contents = | 3161 prerender::PrerenderContents* prerender_contents = |
| 3161 prerender::PrerenderContents::FromWebContents( | 3162 prerender::PrerenderContents::FromWebContents( |
| 3162 handle->GetWebContents()); | 3163 handle->GetWebContents()); |
| 3163 if (!prerender_contents) { | 3164 if (!prerender_contents) { |
| 3164 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble()); | 3165 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble()); |
| 3165 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>( | 3166 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>( |
| 3166 handle, intent_picker_cb); | 3167 handle, intent_picker_cb); |
| 3167 throttles.push_back(std::move(url_to_arc_throttle)); | 3168 throttles.push_back(std::move(url_to_arc_throttle)); |
| 3168 } | 3169 } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3276 render_frame_host, std::move(source), std::move(request)); | 3277 render_frame_host, std::move(source), std::move(request)); |
| 3277 #else | 3278 #else |
| 3278 // Chrome's media remoting implementation depends on the Media Router | 3279 // Chrome's media remoting implementation depends on the Media Router |
| 3279 // infrastructure to identify remote sinks and provide the user interface for | 3280 // infrastructure to identify remote sinks and provide the user interface for |
| 3280 // sink selection. In the case where the Media Router is not present, simply | 3281 // sink selection. In the case where the Media Router is not present, simply |
| 3281 // drop the interface request. This will prevent code paths for media remoting | 3282 // drop the interface request. This will prevent code paths for media remoting |
| 3282 // in the renderer process from activating. | 3283 // in the renderer process from activating. |
| 3283 #endif | 3284 #endif |
| 3284 } | 3285 } |
| 3285 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) | 3286 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) |
| OLD | NEW |