| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 #include "chrome/browser/prerender/prerender_manager_factory.h" | 66 #include "chrome/browser/prerender/prerender_manager_factory.h" |
| 67 #include "chrome/browser/prerender/prerender_message_filter.h" | 67 #include "chrome/browser/prerender/prerender_message_filter.h" |
| 68 #include "chrome/browser/printing/printing_message_filter.h" | 68 #include "chrome/browser/printing/printing_message_filter.h" |
| 69 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" | 69 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" |
| 70 #include "chrome/browser/profiles/profile.h" | 70 #include "chrome/browser/profiles/profile.h" |
| 71 #include "chrome/browser/profiles/profile_io_data.h" | 71 #include "chrome/browser/profiles/profile_io_data.h" |
| 72 #include "chrome/browser/profiling_host/profiling_process_host.h" | 72 #include "chrome/browser/profiling_host/profiling_process_host.h" |
| 73 #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h" | 73 #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h" |
| 74 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" | 74 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" |
| 75 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" | 75 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" |
| 76 #include "chrome/browser/resource_coordinator/background_tab_navigation_throttle
.h" |
| 76 #include "chrome/browser/safe_browsing/browser_url_loader_throttle.h" | 77 #include "chrome/browser/safe_browsing/browser_url_loader_throttle.h" |
| 77 #include "chrome/browser/safe_browsing/certificate_reporting_service.h" | 78 #include "chrome/browser/safe_browsing/certificate_reporting_service.h" |
| 78 #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h" | 79 #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h" |
| 79 #include "chrome/browser/safe_browsing/mojo_safe_browsing_impl.h" | 80 #include "chrome/browser/safe_browsing/mojo_safe_browsing_impl.h" |
| 80 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 81 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 81 #include "chrome/browser/search/instant_service.h" | 82 #include "chrome/browser/search/instant_service.h" |
| 82 #include "chrome/browser/search/instant_service_factory.h" | 83 #include "chrome/browser/search/instant_service_factory.h" |
| 83 #include "chrome/browser/search/search.h" | 84 #include "chrome/browser/search/search.h" |
| 84 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" | 85 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" |
| 85 #include "chrome/browser/speech/tts_controller.h" | 86 #include "chrome/browser/speech/tts_controller.h" |
| (...skipping 3150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3236 if (delay_navigation_throttle) | 3237 if (delay_navigation_throttle) |
| 3237 throttles.push_back(std::move(delay_navigation_throttle)); | 3238 throttles.push_back(std::move(delay_navigation_throttle)); |
| 3238 | 3239 |
| 3239 content::WebContents* web_contents = handle->GetWebContents(); | 3240 content::WebContents* web_contents = handle->GetWebContents(); |
| 3240 if (auto* subresource_filter_client = | 3241 if (auto* subresource_filter_client = |
| 3241 ChromeSubresourceFilterClient::FromWebContents(web_contents)) { | 3242 ChromeSubresourceFilterClient::FromWebContents(web_contents)) { |
| 3242 subresource_filter_client->MaybeAppendNavigationThrottles(handle, | 3243 subresource_filter_client->MaybeAppendNavigationThrottles(handle, |
| 3243 &throttles); | 3244 &throttles); |
| 3244 } | 3245 } |
| 3245 | 3246 |
| 3247 #if !defined(OS_ANDROID) |
| 3248 // BackgroundTabNavigationThrottle is used by TabManager, which is only |
| 3249 // enabled on non-Android platforms. |
| 3250 std::unique_ptr<content::NavigationThrottle> |
| 3251 background_tab_navigation_throttle = resource_coordinator:: |
| 3252 BackgroundTabNavigationThrottle::MaybeCreateThrottleFor(handle); |
| 3253 if (background_tab_navigation_throttle) |
| 3254 throttles.push_back(std::move(background_tab_navigation_throttle)); |
| 3255 #endif |
| 3256 |
| 3246 return throttles; | 3257 return throttles; |
| 3247 } | 3258 } |
| 3248 | 3259 |
| 3249 std::unique_ptr<content::NavigationUIData> | 3260 std::unique_ptr<content::NavigationUIData> |
| 3250 ChromeContentBrowserClient::GetNavigationUIData( | 3261 ChromeContentBrowserClient::GetNavigationUIData( |
| 3251 content::NavigationHandle* navigation_handle) { | 3262 content::NavigationHandle* navigation_handle) { |
| 3252 return base::MakeUnique<ChromeNavigationUIData>(navigation_handle); | 3263 return base::MakeUnique<ChromeNavigationUIData>(navigation_handle); |
| 3253 } | 3264 } |
| 3254 | 3265 |
| 3255 content::DevToolsManagerDelegate* | 3266 content::DevToolsManagerDelegate* |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3463 // displayed URL when rewriting chrome://help to chrome://settings/help. | 3474 // displayed URL when rewriting chrome://help to chrome://settings/help. |
| 3464 return url->SchemeIs(content::kChromeUIScheme) && | 3475 return url->SchemeIs(content::kChromeUIScheme) && |
| 3465 url->host() == chrome::kChromeUISettingsHost; | 3476 url->host() == chrome::kChromeUISettingsHost; |
| 3466 } | 3477 } |
| 3467 | 3478 |
| 3468 // static | 3479 // static |
| 3469 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3480 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3470 const storage::QuotaSettings* settings) { | 3481 const storage::QuotaSettings* settings) { |
| 3471 g_default_quota_settings = settings; | 3482 g_default_quota_settings = settings; |
| 3472 } | 3483 } |
| OLD | NEW |