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

Side by Side Diff: content/shell/browser/shell_content_browser_client.cc

Issue 2431753002: Mus experiment in content shell on Android.
Patch Set: Fixed gn check 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 30 matching lines...) Expand all
41 #include "net/url_request/url_request_context_getter.h" 41 #include "net/url_request/url_request_context_getter.h"
42 #include "ui/base/resource/resource_bundle.h" 42 #include "ui/base/resource/resource_bundle.h"
43 #include "url/gurl.h" 43 #include "url/gurl.h"
44 #include "url/origin.h" 44 #include "url/origin.h"
45 45
46 #if defined(OS_ANDROID) 46 #if defined(OS_ANDROID)
47 #include "base/android/apk_assets.h" 47 #include "base/android/apk_assets.h"
48 #include "base/android/path_utils.h" 48 #include "base/android/path_utils.h"
49 #include "components/crash/content/browser/crash_dump_manager_android.h" 49 #include "components/crash/content/browser/crash_dump_manager_android.h"
50 #include "content/shell/android/shell_descriptors.h" 50 #include "content/shell/android/shell_descriptors.h"
51 #include "services/tracing/mojo_tracing_application_factory.h"
52 #include "services/ui/ime/test_ime_driver/mojo_test_ime_application_factory.h"
53 #include "services/ui/mojo_ui_application_factory.h"
51 #endif 54 #endif
52 55
53 #if defined(OS_POSIX) && !defined(OS_MACOSX) 56 #if defined(OS_POSIX) && !defined(OS_MACOSX)
54 #include "base/debug/leak_annotations.h" 57 #include "base/debug/leak_annotations.h"
55 #include "components/crash/content/app/breakpad_linux.h" 58 #include "components/crash/content/app/breakpad_linux.h"
56 #include "components/crash/content/browser/crash_handler_host_linux.h" 59 #include "components/crash/content/browser/crash_handler_host_linux.h"
57 #include "content/public/common/content_descriptors.h" 60 #include "content/public/common/content_descriptors.h"
58 #endif 61 #endif
59 62
60 #if defined(OS_WIN) 63 #if defined(OS_WIN)
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return false; 190 return false;
188 } 191 }
189 192
190 void ShellContentBrowserClient::RegisterInProcessServices( 193 void ShellContentBrowserClient::RegisterInProcessServices(
191 StaticServiceMap* services) { 194 StaticServiceMap* services) {
192 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) 195 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
193 content::ServiceInfo info; 196 content::ServiceInfo info;
194 info.factory = base::Bind(&media::CreateMojoMediaApplication); 197 info.factory = base::Bind(&media::CreateMojoMediaApplication);
195 services->insert(std::make_pair("service:media", info)); 198 services->insert(std::make_pair("service:media", info));
196 #endif 199 #endif
200 #if defined(OS_ANDROID)
201 // Register Mus and the required services for the Mus demo to run.
202 content::ServiceInfo mus_info;
203 mus_info.factory = base::Bind(&ui::CreateMojoUIApplication);
204 mus_info.service_owns_context = true;
205 services->insert(std::make_pair("service:ui", mus_info));
206
207 content::ServiceInfo tracing_info;
208 tracing_info.factory = base::Bind(&tracing::CreateMojoTracingApplication);
209 services->insert(std::make_pair("mojo:tracing", tracing_info));
210
211 content::ServiceInfo test_ime_info;
212 test_ime_info.factory = base::Bind(&ui::test::CreateMojoTestIMEApplication);
213 test_ime_info.service_owns_context = true;
214 services->insert(std::make_pair("service:test_ime_driver", test_ime_info));
215 #endif
197 } 216 }
198 217
199 void ShellContentBrowserClient::RegisterOutOfProcessServices( 218 void ShellContentBrowserClient::RegisterOutOfProcessServices(
200 OutOfProcessServiceMap* services) { 219 OutOfProcessServiceMap* services) {
201 services->insert(std::make_pair(kTestServiceUrl, 220 services->insert(std::make_pair(kTestServiceUrl,
202 base::UTF8ToUTF16("Test Service"))); 221 base::UTF8ToUTF16("Test Service")));
203 } 222 }
204 223
205 std::unique_ptr<base::Value> 224 std::unique_ptr<base::Value>
206 ShellContentBrowserClient::GetServiceManifestOverlay( 225 ShellContentBrowserClient::GetServiceManifestOverlay(
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 ShellBrowserContext* ShellContentBrowserClient::browser_context() { 391 ShellBrowserContext* ShellContentBrowserClient::browser_context() {
373 return shell_browser_main_parts_->browser_context(); 392 return shell_browser_main_parts_->browser_context();
374 } 393 }
375 394
376 ShellBrowserContext* 395 ShellBrowserContext*
377 ShellContentBrowserClient::off_the_record_browser_context() { 396 ShellContentBrowserClient::off_the_record_browser_context() {
378 return shell_browser_main_parts_->off_the_record_browser_context(); 397 return shell_browser_main_parts_->off_the_record_browser_context();
379 } 398 }
380 399
381 } // namespace content 400 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698