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

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

Issue 2398783002: Rename a bunch of Mojo Application stuff to reference Services. (Closed)
Patch Set: . Created 4 years, 2 months 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 #include "content/public/browser/render_view_host.h" 158 #include "content/public/browser/render_view_host.h"
159 #include "content/public/browser/resource_context.h" 159 #include "content/public/browser/resource_context.h"
160 #include "content/public/browser/site_instance.h" 160 #include "content/public/browser/site_instance.h"
161 #include "content/public/browser/storage_partition.h" 161 #include "content/public/browser/storage_partition.h"
162 #include "content/public/browser/vpn_service_proxy.h" 162 #include "content/public/browser/vpn_service_proxy.h"
163 #include "content/public/browser/web_contents.h" 163 #include "content/public/browser/web_contents.h"
164 #include "content/public/common/child_process_host.h" 164 #include "content/public/common/child_process_host.h"
165 #include "content/public/common/content_descriptors.h" 165 #include "content/public/common/content_descriptors.h"
166 #include "content/public/common/content_features.h" 166 #include "content/public/common/content_features.h"
167 #include "content/public/common/content_switches.h" 167 #include "content/public/common/content_switches.h"
168 #include "content/public/common/mojo_shell_connection.h"
169 #include "content/public/common/sandbox_type.h" 168 #include "content/public/common/sandbox_type.h"
169 #include "content/public/common/service_manager_connection.h"
170 #include "content/public/common/service_names.h" 170 #include "content/public/common/service_names.h"
171 #include "content/public/common/url_utils.h" 171 #include "content/public/common/url_utils.h"
172 #include "content/public/common/web_preferences.h" 172 #include "content/public/common/web_preferences.h"
173 #include "device/bluetooth/adapter.h" 173 #include "device/bluetooth/adapter.h"
174 #include "device/bluetooth/public/interfaces/adapter.mojom.h" 174 #include "device/bluetooth/public/interfaces/adapter.mojom.h"
175 #include "device/usb/public/interfaces/chooser_service.mojom.h" 175 #include "device/usb/public/interfaces/chooser_service.mojom.h"
176 #include "device/usb/public/interfaces/device_manager.mojom.h" 176 #include "device/usb/public/interfaces/device_manager.mojom.h"
177 #include "gin/v8_initializer.h" 177 #include "gin/v8_initializer.h"
178 #include "net/base/mime_util.h" 178 #include "net/base/mime_util.h"
179 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 179 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
(...skipping 2842 matching lines...) Expand 10 before | Expand all | Expand 10 after
3022 } 3022 }
3023 3023
3024 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess( 3024 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess(
3025 shell::InterfaceRegistry* registry, 3025 shell::InterfaceRegistry* registry,
3026 content::GpuProcessHost* render_process_host) { 3026 content::GpuProcessHost* render_process_host) {
3027 registry->AddInterface( 3027 registry->AddInterface(
3028 base::Bind(&metrics::CallStackProfileCollector::Create, 3028 base::Bind(&metrics::CallStackProfileCollector::Create,
3029 metrics::CallStackProfileParams::GPU_PROCESS)); 3029 metrics::CallStackProfileParams::GPU_PROCESS));
3030 } 3030 }
3031 3031
3032 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( 3032 void ChromeContentBrowserClient::RegisterInProcessServices(
3033 StaticMojoApplicationMap* apps) { 3033 StaticServiceMap* services) {
3034 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) 3034 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
3035 content::MojoApplicationInfo app_info; 3035 content::ServiceInfo info;
3036 app_info.application_factory = base::Bind(&media::CreateMojoMediaApplication); 3036 info.factory = base::Bind(&media::CreateMojoMediaApplication);
3037 apps->insert(std::make_pair("service:media", app_info)); 3037 services->insert(std::make_pair("service:media", app_info));
3038 #endif 3038 #endif
3039 #if defined(OS_CHROMEOS) 3039 #if defined(OS_CHROMEOS)
3040 content::MojoShellConnection::GetForProcess()->AddConnectionFilter( 3040 content::ServiceManagerConnection::GetForProcess()->AddConnectionFilter(
3041 base::MakeUnique<chromeos::ChromeInterfaceFactory>()); 3041 base::MakeUnique<chromeos::ChromeInterfaceFactory>());
3042 #endif // OS_CHROMEOS 3042 #endif // OS_CHROMEOS
3043 } 3043 }
3044 3044
3045 void ChromeContentBrowserClient::RegisterOutOfProcessMojoApplications( 3045 void ChromeContentBrowserClient::RegisterOutOfProcessServices(
3046 OutOfProcessMojoApplicationMap* apps) { 3046 OutOfProcessServiceMap* services) {
3047 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) 3047 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS)
3048 apps->insert(std::make_pair("service:media", 3048 services->insert(std::make_pair("service:media",
3049 base::ASCIIToUTF16("Media App"))); 3049 base::ASCIIToUTF16("Media Service")));
3050 #endif 3050 #endif
3051 } 3051 }
3052 3052
3053 std::unique_ptr<base::Value> 3053 std::unique_ptr<base::Value>
3054 ChromeContentBrowserClient::GetServiceManifestOverlay( 3054 ChromeContentBrowserClient::GetServiceManifestOverlay(
3055 const std::string& name) { 3055 const std::string& name) {
3056 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 3056 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
3057 int id = -1; 3057 int id = -1;
3058 if (name == content::kBrowserMojoApplicationName) 3058 if (name == content::kBrowserServiceName)
3059 id = IDR_CHROME_CONTENT_BROWSER_MANIFEST_OVERLAY; 3059 id = IDR_CHROME_CONTENT_BROWSER_MANIFEST_OVERLAY;
3060 else if (name == content::kGpuMojoApplicationName) 3060 else if (name == content::kGpuServiceName)
3061 id = IDR_CHROME_CONTENT_GPU_MANIFEST_OVERLAY; 3061 id = IDR_CHROME_CONTENT_GPU_MANIFEST_OVERLAY;
3062 else if (name == content::kUtilityMojoApplicationName) 3062 else if (name == content::kUtilityServiceName)
3063 id = IDR_CHROME_CONTENT_UTILITY_MANIFEST_OVERLAY; 3063 id = IDR_CHROME_CONTENT_UTILITY_MANIFEST_OVERLAY;
3064 if (id == -1) 3064 if (id == -1)
3065 return nullptr; 3065 return nullptr;
3066 3066
3067 base::StringPiece manifest_contents = 3067 base::StringPiece manifest_contents =
3068 rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE); 3068 rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE);
3069 return base::JSONReader::Read(manifest_contents); 3069 return base::JSONReader::Read(manifest_contents);
3070 } 3070 }
3071 3071
3072 void ChromeContentBrowserClient::OpenURL( 3072 void ChromeContentBrowserClient::OpenURL(
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
3278 if (channel <= kMaxDisableEncryptionChannel) { 3278 if (channel <= kMaxDisableEncryptionChannel) {
3279 static const char* const kWebRtcDevSwitchNames[] = { 3279 static const char* const kWebRtcDevSwitchNames[] = {
3280 switches::kDisableWebRtcEncryption, 3280 switches::kDisableWebRtcEncryption,
3281 }; 3281 };
3282 to_command_line->CopySwitchesFrom(from_command_line, 3282 to_command_line->CopySwitchesFrom(from_command_line,
3283 kWebRtcDevSwitchNames, 3283 kWebRtcDevSwitchNames,
3284 arraysize(kWebRtcDevSwitchNames)); 3284 arraysize(kWebRtcDevSwitchNames));
3285 } 3285 }
3286 } 3286 }
3287 #endif // defined(ENABLE_WEBRTC) 3287 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/chromeos/accessibility/accessibility_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698