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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 #include "components/content_settings/core/browser/cookie_settings.h" | 122 #include "components/content_settings/core/browser/cookie_settings.h" |
123 #include "components/content_settings/core/browser/host_content_settings_map.h" | 123 #include "components/content_settings/core/browser/host_content_settings_map.h" |
124 #include "components/content_settings/core/common/content_settings.h" | 124 #include "components/content_settings/core/common/content_settings.h" |
125 #include "components/content_settings/core/common/content_settings_types.h" | 125 #include "components/content_settings/core/common/content_settings_types.h" |
126 #include "components/dom_distiller/core/dom_distiller_switches.h" | 126 #include "components/dom_distiller/core/dom_distiller_switches.h" |
127 #include "components/dom_distiller/core/url_constants.h" | 127 #include "components/dom_distiller/core/url_constants.h" |
128 #include "components/error_page/common/error_page_switches.h" | 128 #include "components/error_page/common/error_page_switches.h" |
129 #include "components/google/core/browser/google_util.h" | 129 #include "components/google/core/browser/google_util.h" |
130 #include "components/metrics/call_stack_profile_collector.h" | 130 #include "components/metrics/call_stack_profile_collector.h" |
131 #include "components/metrics/client_info.h" | 131 #include "components/metrics/client_info.h" |
| 132 #include "components/nacl/common/nacl_constants.h" |
132 #include "components/net_log/chrome_net_log.h" | 133 #include "components/net_log/chrome_net_log.h" |
133 #include "components/password_manager/content/browser/content_password_manager_d
river_factory.h" | 134 #include "components/password_manager/content/browser/content_password_manager_d
river_factory.h" |
134 #include "components/payments/payment_request.mojom.h" | 135 #include "components/payments/payment_request.mojom.h" |
135 #include "components/pref_registry/pref_registry_syncable.h" | 136 #include "components/pref_registry/pref_registry_syncable.h" |
136 #include "components/prefs/pref_service.h" | 137 #include "components/prefs/pref_service.h" |
137 #include "components/prefs/scoped_user_pref_update.h" | 138 #include "components/prefs/scoped_user_pref_update.h" |
138 #include "components/rappor/rappor_recorder_impl.h" | 139 #include "components/rappor/rappor_recorder_impl.h" |
139 #include "components/rappor/rappor_utils.h" | 140 #include "components/rappor/rappor_utils.h" |
140 #include "components/security_interstitials/core/ssl_error_ui.h" | 141 #include "components/security_interstitials/core/ssl_error_ui.h" |
141 #include "components/signin/core/common/profile_management_switches.h" | 142 #include "components/signin/core/common/profile_management_switches.h" |
(...skipping 2912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3054 else if (name == content::mojom::kUtilityServiceName) | 3055 else if (name == content::mojom::kUtilityServiceName) |
3055 id = IDR_CHROME_CONTENT_UTILITY_MANIFEST_OVERLAY; | 3056 id = IDR_CHROME_CONTENT_UTILITY_MANIFEST_OVERLAY; |
3056 if (id == -1) | 3057 if (id == -1) |
3057 return nullptr; | 3058 return nullptr; |
3058 | 3059 |
3059 base::StringPiece manifest_contents = | 3060 base::StringPiece manifest_contents = |
3060 rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE); | 3061 rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE); |
3061 return base::JSONReader::Read(manifest_contents); | 3062 return base::JSONReader::Read(manifest_contents); |
3062 } | 3063 } |
3063 | 3064 |
| 3065 std::vector<std::pair<std::string, int>> |
| 3066 ChromeContentBrowserClient::GetExtraServiceManifests() { |
| 3067 return std::vector<std::pair<std::string, int>>({ |
| 3068 #if !defined(DISABLE_NACL) |
| 3069 {nacl::kNaClLoaderServiceName, IDR_NACL_LOADER_MANIFEST}, |
| 3070 #if defined(OS_WIN) |
| 3071 {nacl::kNaClBrokerServiceName, IDR_NACL_BROKER_MANIFEST}, |
| 3072 #endif // defined(OS_WIN) |
| 3073 #endif // !defined(DISABLE_NACL) |
| 3074 }); |
| 3075 } |
| 3076 |
3064 void ChromeContentBrowserClient::OpenURL( | 3077 void ChromeContentBrowserClient::OpenURL( |
3065 content::BrowserContext* browser_context, | 3078 content::BrowserContext* browser_context, |
3066 const content::OpenURLParams& params, | 3079 const content::OpenURLParams& params, |
3067 const base::Callback<void(content::WebContents*)>& callback) { | 3080 const base::Callback<void(content::WebContents*)>& callback) { |
3068 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 3081 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
3069 | 3082 |
3070 #if BUILDFLAG(ANDROID_JAVA_UI) | 3083 #if BUILDFLAG(ANDROID_JAVA_UI) |
3071 ServiceTabLauncher::GetInstance()->LaunchTab(browser_context, params, | 3084 ServiceTabLauncher::GetInstance()->LaunchTab(browser_context, params, |
3072 callback); | 3085 callback); |
3073 #else | 3086 #else |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3276 render_frame_host, std::move(source), std::move(request)); | 3289 render_frame_host, std::move(source), std::move(request)); |
3277 #else | 3290 #else |
3278 // Chrome's media remoting implementation depends on the Media Router | 3291 // Chrome's media remoting implementation depends on the Media Router |
3279 // infrastructure to identify remote sinks and provide the user interface for | 3292 // 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 | 3293 // 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 | 3294 // drop the interface request. This will prevent code paths for media remoting |
3282 // in the renderer process from activating. | 3295 // in the renderer process from activating. |
3283 #endif | 3296 #endif |
3284 } | 3297 } |
3285 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) | 3298 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) |
OLD | NEW |