Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(656)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2501913002: Change the NaCl loader and broker processes to use the ServiceManager. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 #include "components/content_settings/core/browser/cookie_settings.h" 123 #include "components/content_settings/core/browser/cookie_settings.h"
124 #include "components/content_settings/core/browser/host_content_settings_map.h" 124 #include "components/content_settings/core/browser/host_content_settings_map.h"
125 #include "components/content_settings/core/common/content_settings.h" 125 #include "components/content_settings/core/common/content_settings.h"
126 #include "components/content_settings/core/common/content_settings_types.h" 126 #include "components/content_settings/core/common/content_settings_types.h"
127 #include "components/dom_distiller/core/dom_distiller_switches.h" 127 #include "components/dom_distiller/core/dom_distiller_switches.h"
128 #include "components/dom_distiller/core/url_constants.h" 128 #include "components/dom_distiller/core/url_constants.h"
129 #include "components/error_page/common/error_page_switches.h" 129 #include "components/error_page/common/error_page_switches.h"
130 #include "components/google/core/browser/google_util.h" 130 #include "components/google/core/browser/google_util.h"
131 #include "components/metrics/call_stack_profile_collector.h" 131 #include "components/metrics/call_stack_profile_collector.h"
132 #include "components/metrics/client_info.h" 132 #include "components/metrics/client_info.h"
133 #include "components/nacl/common/nacl_constants.h"
133 #include "components/net_log/chrome_net_log.h" 134 #include "components/net_log/chrome_net_log.h"
134 #include "components/password_manager/content/browser/content_password_manager_d river_factory.h" 135 #include "components/password_manager/content/browser/content_password_manager_d river_factory.h"
135 #include "components/payments/payment_request.mojom.h" 136 #include "components/payments/payment_request.mojom.h"
136 #include "components/pref_registry/pref_registry_syncable.h" 137 #include "components/pref_registry/pref_registry_syncable.h"
137 #include "components/prefs/pref_service.h" 138 #include "components/prefs/pref_service.h"
138 #include "components/prefs/scoped_user_pref_update.h" 139 #include "components/prefs/scoped_user_pref_update.h"
139 #include "components/rappor/rappor_recorder_impl.h" 140 #include "components/rappor/rappor_recorder_impl.h"
140 #include "components/rappor/rappor_utils.h" 141 #include "components/rappor/rappor_utils.h"
141 #include "components/security_interstitials/core/ssl_error_ui.h" 142 #include "components/security_interstitials/core/ssl_error_ui.h"
142 #include "components/signin/core/common/profile_management_switches.h" 143 #include "components/signin/core/common/profile_management_switches.h"
(...skipping 2933 matching lines...) Expand 10 before | Expand all | Expand 10 after
3076 else if (name == content::mojom::kUtilityServiceName) 3077 else if (name == content::mojom::kUtilityServiceName)
3077 id = IDR_CHROME_CONTENT_UTILITY_MANIFEST_OVERLAY; 3078 id = IDR_CHROME_CONTENT_UTILITY_MANIFEST_OVERLAY;
3078 if (id == -1) 3079 if (id == -1)
3079 return nullptr; 3080 return nullptr;
3080 3081
3081 base::StringPiece manifest_contents = 3082 base::StringPiece manifest_contents =
3082 rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE); 3083 rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE);
3083 return base::JSONReader::Read(manifest_contents); 3084 return base::JSONReader::Read(manifest_contents);
3084 } 3085 }
3085 3086
3087 std::vector<content::ContentBrowserClient::ServiceManifestInfo>
3088 ChromeContentBrowserClient::GetExtraServiceManifests() {
3089 return std::vector<content::ContentBrowserClient::ServiceManifestInfo>({
3090 #if !defined(DISABLE_NACL)
3091 {nacl::kNaClLoaderServiceName, IDR_NACL_LOADER_MANIFEST},
3092 #if defined(OS_WIN)
3093 {nacl::kNaClBrokerServiceName, IDR_NACL_BROKER_MANIFEST},
3094 #endif // defined(OS_WIN)
3095 #endif // !defined(DISABLE_NACL)
3096 });
3097 }
3098
3086 void ChromeContentBrowserClient::OpenURL( 3099 void ChromeContentBrowserClient::OpenURL(
3087 content::BrowserContext* browser_context, 3100 content::BrowserContext* browser_context,
3088 const content::OpenURLParams& params, 3101 const content::OpenURLParams& params,
3089 const base::Callback<void(content::WebContents*)>& callback) { 3102 const base::Callback<void(content::WebContents*)>& callback) {
3090 DCHECK_CURRENTLY_ON(BrowserThread::UI); 3103 DCHECK_CURRENTLY_ON(BrowserThread::UI);
3091 3104
3092 #if BUILDFLAG(ANDROID_JAVA_UI) 3105 #if BUILDFLAG(ANDROID_JAVA_UI)
3093 ServiceTabLauncher::GetInstance()->LaunchTab(browser_context, params, 3106 ServiceTabLauncher::GetInstance()->LaunchTab(browser_context, params,
3094 callback); 3107 callback);
3095 #else 3108 #else
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
3299 render_frame_host, std::move(source), std::move(request)); 3312 render_frame_host, std::move(source), std::move(request));
3300 #else 3313 #else
3301 // Chrome's media remoting implementation depends on the Media Router 3314 // Chrome's media remoting implementation depends on the Media Router
3302 // infrastructure to identify remote sinks and provide the user interface for 3315 // infrastructure to identify remote sinks and provide the user interface for
3303 // sink selection. In the case where the Media Router is not present, simply 3316 // sink selection. In the case where the Media Router is not present, simply
3304 // drop the interface request. This will prevent code paths for media remoting 3317 // drop the interface request. This will prevent code paths for media remoting
3305 // in the renderer process from activating. 3318 // in the renderer process from activating.
3306 #endif 3319 #endif
3307 } 3320 }
3308 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) 3321 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698