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

Side by Side Diff: content/shell/browser/shell_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/shell_content_browser_client.h" 5 #include "content/shell/browser/shell_content_browser_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 url::kDataScheme, 180 url::kDataScheme,
181 url::kFileScheme, 181 url::kFileScheme,
182 }; 182 };
183 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { 183 for (size_t i = 0; i < arraysize(kProtocolList); ++i) {
184 if (url.scheme() == kProtocolList[i]) 184 if (url.scheme() == kProtocolList[i])
185 return true; 185 return true;
186 } 186 }
187 return false; 187 return false;
188 } 188 }
189 189
190 void ShellContentBrowserClient::RegisterInProcessMojoApplications( 190 void ShellContentBrowserClient::RegisterInProcessServices(
191 StaticMojoApplicationMap* apps) { 191 StaticServiceMap* services) {
192 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) 192 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
193 content::MojoApplicationInfo app_info; 193 content::ServiceInfo info;
194 app_info.application_factory = base::Bind(&media::CreateMojoMediaApplication); 194 info.factory = base::Bind(&media::CreateMojoMediaApplication);
195 apps->insert(std::make_pair("service:media", app_info)); 195 services->insert(std::make_pair("service:media", info));
196 #endif 196 #endif
197 } 197 }
198 198
199 void ShellContentBrowserClient::RegisterOutOfProcessMojoApplications( 199 void ShellContentBrowserClient::RegisterOutOfProcessServices(
200 OutOfProcessMojoApplicationMap* apps) { 200 OutOfProcessServiceMap* services) {
201 apps->insert(std::make_pair(kTestServiceUrl, 201 services->insert(std::make_pair(kTestServiceUrl,
202 base::UTF8ToUTF16("Test Service"))); 202 base::UTF8ToUTF16("Test Service")));
203 } 203 }
204 204
205 std::unique_ptr<base::Value> 205 std::unique_ptr<base::Value>
206 ShellContentBrowserClient::GetServiceManifestOverlay( 206 ShellContentBrowserClient::GetServiceManifestOverlay(
207 const std::string& name) { 207 const std::string& name) {
208 int id = -1; 208 int id = -1;
209 if (name == content::kBrowserMojoApplicationName) 209 if (name == content::kBrowserServiceName)
210 id = IDR_CONTENT_SHELL_BROWSER_MANIFEST_OVERLAY; 210 id = IDR_CONTENT_SHELL_BROWSER_MANIFEST_OVERLAY;
211 else if (name == content::kRendererMojoApplicationName) 211 else if (name == content::kRendererServiceName)
212 id = IDR_CONTENT_SHELL_RENDERER_MANIFEST_OVERLAY; 212 id = IDR_CONTENT_SHELL_RENDERER_MANIFEST_OVERLAY;
213 else if (name == content::kUtilityMojoApplicationName) 213 else if (name == content::kUtilityServiceName)
214 id = IDR_CONTENT_SHELL_UTILITY_MANIFEST_OVERLAY; 214 id = IDR_CONTENT_SHELL_UTILITY_MANIFEST_OVERLAY;
215 if (id == -1) 215 if (id == -1)
216 return nullptr; 216 return nullptr;
217 217
218 base::StringPiece manifest_contents = 218 base::StringPiece manifest_contents =
219 ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( 219 ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
220 id, ui::ScaleFactor::SCALE_FACTOR_NONE); 220 id, ui::ScaleFactor::SCALE_FACTOR_NONE);
221 return base::JSONReader::Read(manifest_contents); 221 return base::JSONReader::Read(manifest_contents);
222 } 222 }
223 223
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 ShellBrowserContext* ShellContentBrowserClient::browser_context() { 372 ShellBrowserContext* ShellContentBrowserClient::browser_context() {
373 return shell_browser_main_parts_->browser_context(); 373 return shell_browser_main_parts_->browser_context();
374 } 374 }
375 375
376 ShellBrowserContext* 376 ShellBrowserContext*
377 ShellContentBrowserClient::off_the_record_browser_context() { 377 ShellContentBrowserClient::off_the_record_browser_context() {
378 return shell_browser_main_parts_->off_the_record_browser_context(); 378 return shell_browser_main_parts_->off_the_record_browser_context();
379 } 379 }
380 380
381 } // namespace content 381 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_content_browser_client.h ('k') | content/shell/utility/shell_content_utility_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698