| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 #include "chrome/browser/prerender/prerender_manager.h" | 65 #include "chrome/browser/prerender/prerender_manager.h" |
| 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/renderer_host/chrome_navigation_ui_data.h" | 72 #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h" |
| 73 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" | 73 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" |
| 74 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" | 74 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" |
| 75 #include "chrome/browser/resource_coordinator/background_tab_navigation_throttle
.h" |
| 75 #include "chrome/browser/safe_browsing/browser_url_loader_throttle.h" | 76 #include "chrome/browser/safe_browsing/browser_url_loader_throttle.h" |
| 76 #include "chrome/browser/safe_browsing/certificate_reporting_service.h" | 77 #include "chrome/browser/safe_browsing/certificate_reporting_service.h" |
| 77 #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h" | 78 #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h" |
| 78 #include "chrome/browser/safe_browsing/mojo_safe_browsing_impl.h" | 79 #include "chrome/browser/safe_browsing/mojo_safe_browsing_impl.h" |
| 79 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 80 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 80 #include "chrome/browser/search/instant_service.h" | 81 #include "chrome/browser/search/instant_service.h" |
| 81 #include "chrome/browser/search/instant_service_factory.h" | 82 #include "chrome/browser/search/instant_service_factory.h" |
| 82 #include "chrome/browser/search/search.h" | 83 #include "chrome/browser/search/search.h" |
| 83 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" | 84 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" |
| 84 #include "chrome/browser/speech/tts_controller.h" | 85 #include "chrome/browser/speech/tts_controller.h" |
| (...skipping 3234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3319 if (delay_navigation_throttle) | 3320 if (delay_navigation_throttle) |
| 3320 throttles.push_back(std::move(delay_navigation_throttle)); | 3321 throttles.push_back(std::move(delay_navigation_throttle)); |
| 3321 | 3322 |
| 3322 content::WebContents* web_contents = handle->GetWebContents(); | 3323 content::WebContents* web_contents = handle->GetWebContents(); |
| 3323 if (auto* subresource_filter_client = | 3324 if (auto* subresource_filter_client = |
| 3324 ChromeSubresourceFilterClient::FromWebContents(web_contents)) { | 3325 ChromeSubresourceFilterClient::FromWebContents(web_contents)) { |
| 3325 subresource_filter_client->MaybeAppendNavigationThrottles(handle, | 3326 subresource_filter_client->MaybeAppendNavigationThrottles(handle, |
| 3326 &throttles); | 3327 &throttles); |
| 3327 } | 3328 } |
| 3328 | 3329 |
| 3330 std::unique_ptr<content::NavigationThrottle> tab_navigation_throttle = |
| 3331 resource_coordinator::BackgroundTabNavigationThrottle:: |
| 3332 MaybeCreateThrottleFor(handle); |
| 3333 if (tab_navigation_throttle) |
| 3334 throttles.push_back(std::move(tab_navigation_throttle)); |
| 3335 |
| 3329 return throttles; | 3336 return throttles; |
| 3330 } | 3337 } |
| 3331 | 3338 |
| 3332 std::unique_ptr<content::NavigationUIData> | 3339 std::unique_ptr<content::NavigationUIData> |
| 3333 ChromeContentBrowserClient::GetNavigationUIData( | 3340 ChromeContentBrowserClient::GetNavigationUIData( |
| 3334 content::NavigationHandle* navigation_handle) { | 3341 content::NavigationHandle* navigation_handle) { |
| 3335 return base::MakeUnique<ChromeNavigationUIData>(navigation_handle); | 3342 return base::MakeUnique<ChromeNavigationUIData>(navigation_handle); |
| 3336 } | 3343 } |
| 3337 | 3344 |
| 3338 content::DevToolsManagerDelegate* | 3345 content::DevToolsManagerDelegate* |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3449 safe_browsing_service_->database_manager(), | 3456 safe_browsing_service_->database_manager(), |
| 3450 safe_browsing_service_->ui_manager(), wc_getter)); | 3457 safe_browsing_service_->ui_manager(), wc_getter)); |
| 3451 return result; | 3458 return result; |
| 3452 } | 3459 } |
| 3453 | 3460 |
| 3454 // static | 3461 // static |
| 3455 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3462 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3456 const storage::QuotaSettings* settings) { | 3463 const storage::QuotaSettings* settings) { |
| 3457 g_default_quota_settings = settings; | 3464 g_default_quota_settings = settings; |
| 3458 } | 3465 } |
| OLD | NEW |