From 67b59fadb9c7f23ddd14f96e4dfccef2f7e680eb Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Tue, 19 May 2015 09:41:44 -0700 Subject: [PATCH] Make android directory for Android-specific bits of SkyShell This CL prepares us to create an iOS version of SkyShell by moving the Android-specific bits into an android directory. R=chinmaygarde@google.com Review URL: https://codereview.chromium.org/1139873004 --- shell/BUILD.gn | 45 ++++++++++--------- shell/{ => android}/library_loader.cc | 10 ++--- .../domokit/sky/shell/GestureProvider.java | 0 .../sky/shell/PlatformServiceProvider.java} | 6 +-- .../org/domokit/sky/shell/PlatformView.java | 0 .../org/domokit/sky/shell/ServiceFactory.java | 0 .../domokit/sky/shell/ServiceRegistry.java | 0 .../org/domokit/sky/shell/SkyActivity.java | 0 .../org/domokit/sky/shell/SkyApplication.java | 0 .../org/domokit/sky/shell/SkyMain.java | 0 .../domokit/sky/shell/TracingController.java | 0 shell/android/platform_service_provider.cc | 45 +++++++++++++++++++ shell/android/platform_service_provider.h | 18 ++++++++ shell/{ => android}/platform_view.cc | 2 +- shell/{ => android}/platform_view.h | 0 shell/{ => android}/sky_main.cc | 6 ++- shell/{ => android}/sky_main.h | 0 shell/{ => android}/tracing_controller.cc | 2 +- shell/{ => android}/tracing_controller.h | 0 shell/java_service_provider.cc | 27 ----------- shell/java_service_provider.h | 21 --------- shell/service_provider.h | 36 +++++++++++++++ shell/shell.cc | 14 +++--- shell/shell.h | 14 +++--- shell/ui/engine.cc | 18 ++------ shell/ui/engine.h | 4 +- 26 files changed, 155 insertions(+), 113 deletions(-) rename shell/{ => android}/library_loader.cc (84%) rename shell/{ => android}/org/domokit/sky/shell/GestureProvider.java (100%) rename shell/{org/domokit/sky/shell/JavaServiceProvider.java => android/org/domokit/sky/shell/PlatformServiceProvider.java} (87%) rename shell/{ => android}/org/domokit/sky/shell/PlatformView.java (100%) rename shell/{ => android}/org/domokit/sky/shell/ServiceFactory.java (100%) rename shell/{ => android}/org/domokit/sky/shell/ServiceRegistry.java (100%) rename shell/{ => android}/org/domokit/sky/shell/SkyActivity.java (100%) rename shell/{ => android}/org/domokit/sky/shell/SkyApplication.java (100%) rename shell/{ => android}/org/domokit/sky/shell/SkyMain.java (100%) rename shell/{ => android}/org/domokit/sky/shell/TracingController.java (100%) create mode 100644 shell/android/platform_service_provider.cc create mode 100644 shell/android/platform_service_provider.h rename shell/{ => android}/platform_view.cc (98%) rename shell/{ => android}/platform_view.h (100%) rename shell/{ => android}/sky_main.cc (90%) rename shell/{ => android}/sky_main.h (100%) rename shell/{ => android}/tracing_controller.cc (97%) rename shell/{ => android}/tracing_controller.h (100%) delete mode 100644 shell/java_service_provider.cc delete mode 100644 shell/java_service_provider.h create mode 100644 shell/service_provider.h diff --git a/shell/BUILD.gn b/shell/BUILD.gn index c25f5dbdd70..1e087ddde79 100644 --- a/shell/BUILD.gn +++ b/shell/BUILD.gn @@ -9,16 +9,25 @@ import("//build/config/android/rules.gni") generate_jni("jni_headers") { sources = [ - "org/domokit/sky/shell/JavaServiceProvider.java", - "org/domokit/sky/shell/PlatformView.java", - "org/domokit/sky/shell/SkyMain.java", - "org/domokit/sky/shell/TracingController.java", + "android/org/domokit/sky/shell/PlatformServiceProvider.java", + "android/org/domokit/sky/shell/PlatformView.java", + "android/org/domokit/sky/shell/SkyMain.java", + "android/org/domokit/sky/shell/TracingController.java", ] jni_package = "sky/shell" } shared_library("sky_shell") { sources = [ + "android/library_loader.cc", + "android/platform_service_provider.cc", + "android/platform_service_provider.h", + "android/platform_view.cc", + "android/platform_view.h", + "android/sky_main.cc", + "android/sky_main.h", + "android/tracing_controller.cc", + "android/tracing_controller.h", "gpu/ganesh_context.cc", "gpu/ganesh_context.h", "gpu/ganesh_surface.cc", @@ -27,17 +36,9 @@ shared_library("sky_shell") { "gpu/rasterizer.h", "gpu_delegate.cc", "gpu_delegate.h", - "java_service_provider.cc", - "java_service_provider.h", - "library_loader.cc", - "platform_view.cc", - "platform_view.h", + "service_provider.h", "shell.cc", "shell.h", - "sky_main.cc", - "sky_main.h", - "tracing_controller.cc", - "tracing_controller.h", "ui/animator.cc", "ui/animator.h", "ui/engine.cc", @@ -75,15 +76,15 @@ shared_library("sky_shell") { android_library("java") { java_files = [ - "org/domokit/sky/shell/GestureProvider.java", - "org/domokit/sky/shell/JavaServiceProvider.java", - "org/domokit/sky/shell/PlatformView.java", - "org/domokit/sky/shell/ServiceFactory.java", - "org/domokit/sky/shell/ServiceRegistry.java", - "org/domokit/sky/shell/SkyActivity.java", - "org/domokit/sky/shell/SkyApplication.java", - "org/domokit/sky/shell/SkyMain.java", - "org/domokit/sky/shell/TracingController.java", + "android/org/domokit/sky/shell/GestureProvider.java", + "android/org/domokit/sky/shell/PlatformServiceProvider.java", + "android/org/domokit/sky/shell/PlatformView.java", + "android/org/domokit/sky/shell/ServiceFactory.java", + "android/org/domokit/sky/shell/ServiceRegistry.java", + "android/org/domokit/sky/shell/SkyActivity.java", + "android/org/domokit/sky/shell/SkyApplication.java", + "android/org/domokit/sky/shell/SkyMain.java", + "android/org/domokit/sky/shell/TracingController.java", ] deps = [ diff --git a/shell/library_loader.cc b/shell/android/library_loader.cc similarity index 84% rename from shell/library_loader.cc rename to shell/android/library_loader.cc index cd2ce139d8c..70e5816305e 100644 --- a/shell/library_loader.cc +++ b/shell/android/library_loader.cc @@ -10,16 +10,16 @@ #include "base/bind.h" #include "base/logging.h" #include "mojo/android/system/core_impl.h" -#include "sky/shell/java_service_provider.h" -#include "sky/shell/platform_view.h" -#include "sky/shell/sky_main.h" -#include "sky/shell/tracing_controller.h" +#include "sky/shell/android/platform_service_provider.h" +#include "sky/shell/android/platform_view.h" +#include "sky/shell/android/sky_main.h" +#include "sky/shell/android/tracing_controller.h" namespace { base::android::RegistrationMethod kSkyRegisteredMethods[] = { {"CoreImpl", mojo::android::RegisterCoreImpl}, - {"JavaServiceProvider", sky::shell::RegisterJavaServiceProvider}, + {"PlatformServiceProvider", sky::shell::RegisterPlatformServiceProvider}, {"PlatformView", sky::shell::PlatformView::Register}, {"SkyMain", sky::shell::RegisterSkyMain}, {"TracingController", sky::shell::RegisterTracingController}, diff --git a/shell/org/domokit/sky/shell/GestureProvider.java b/shell/android/org/domokit/sky/shell/GestureProvider.java similarity index 100% rename from shell/org/domokit/sky/shell/GestureProvider.java rename to shell/android/org/domokit/sky/shell/GestureProvider.java diff --git a/shell/org/domokit/sky/shell/JavaServiceProvider.java b/shell/android/org/domokit/sky/shell/PlatformServiceProvider.java similarity index 87% rename from shell/org/domokit/sky/shell/JavaServiceProvider.java rename to shell/android/org/domokit/sky/shell/PlatformServiceProvider.java index 47996f46650..70b88666551 100644 --- a/shell/org/domokit/sky/shell/JavaServiceProvider.java +++ b/shell/android/org/domokit/sky/shell/PlatformServiceProvider.java @@ -18,7 +18,7 @@ import org.chromium.mojom.mojo.ServiceProvider; * A collection of services implemented in Java. **/ @JNINamespace("sky::shell") -public class JavaServiceProvider implements ServiceProvider { +public class PlatformServiceProvider implements ServiceProvider { private Core mCore; private Context mContext; @@ -27,10 +27,10 @@ public class JavaServiceProvider implements ServiceProvider { public static void create(Context context, int nativeHandle) { Core core = CoreImpl.getInstance(); MessagePipeHandle pipe = core.acquireNativeHandle(nativeHandle).toMessagePipeHandle(); - ServiceProvider.MANAGER.bind(new JavaServiceProvider(core, context), pipe); + ServiceProvider.MANAGER.bind(new PlatformServiceProvider(core, context), pipe); } - public JavaServiceProvider(Core core, Context context) { + public PlatformServiceProvider(Core core, Context context) { assert core != null; assert context != null; mCore = core; diff --git a/shell/org/domokit/sky/shell/PlatformView.java b/shell/android/org/domokit/sky/shell/PlatformView.java similarity index 100% rename from shell/org/domokit/sky/shell/PlatformView.java rename to shell/android/org/domokit/sky/shell/PlatformView.java diff --git a/shell/org/domokit/sky/shell/ServiceFactory.java b/shell/android/org/domokit/sky/shell/ServiceFactory.java similarity index 100% rename from shell/org/domokit/sky/shell/ServiceFactory.java rename to shell/android/org/domokit/sky/shell/ServiceFactory.java diff --git a/shell/org/domokit/sky/shell/ServiceRegistry.java b/shell/android/org/domokit/sky/shell/ServiceRegistry.java similarity index 100% rename from shell/org/domokit/sky/shell/ServiceRegistry.java rename to shell/android/org/domokit/sky/shell/ServiceRegistry.java diff --git a/shell/org/domokit/sky/shell/SkyActivity.java b/shell/android/org/domokit/sky/shell/SkyActivity.java similarity index 100% rename from shell/org/domokit/sky/shell/SkyActivity.java rename to shell/android/org/domokit/sky/shell/SkyActivity.java diff --git a/shell/org/domokit/sky/shell/SkyApplication.java b/shell/android/org/domokit/sky/shell/SkyApplication.java similarity index 100% rename from shell/org/domokit/sky/shell/SkyApplication.java rename to shell/android/org/domokit/sky/shell/SkyApplication.java diff --git a/shell/org/domokit/sky/shell/SkyMain.java b/shell/android/org/domokit/sky/shell/SkyMain.java similarity index 100% rename from shell/org/domokit/sky/shell/SkyMain.java rename to shell/android/org/domokit/sky/shell/SkyMain.java diff --git a/shell/org/domokit/sky/shell/TracingController.java b/shell/android/org/domokit/sky/shell/TracingController.java similarity index 100% rename from shell/org/domokit/sky/shell/TracingController.java rename to shell/android/org/domokit/sky/shell/TracingController.java diff --git a/shell/android/platform_service_provider.cc b/shell/android/platform_service_provider.cc new file mode 100644 index 00000000000..697861e3444 --- /dev/null +++ b/shell/android/platform_service_provider.cc @@ -0,0 +1,45 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "sky/shell/android/platform_service_provider.h" + +#include "base/android/jni_android.h" +#include "base/bind.h" +#include "base/trace_event/trace_event.h" +#include "jni/PlatformServiceProvider_jni.h" +#include "mojo/public/cpp/bindings/interface_request.h" +#include "sky/shell/service_provider.h" + +namespace sky { +namespace shell { +namespace { + +void CreatePlatformServiceProvider( + mojo::InterfaceRequest request) { + Java_PlatformServiceProvider_create( + base::android::AttachCurrentThread(), + base::android::GetApplicationContext(), + request.PassMessagePipe().release().value()); +} + +} // namespace + +bool RegisterPlatformServiceProvider(JNIEnv* env) { + return RegisterNativesImpl(env); +} + +mojo::ServiceProviderPtr CreateServiceProvider( + ServiceProviderContext* context) { + mojo::MessagePipe pipe; + context->java_task_runner->PostTask( + FROM_HERE, + base::Bind(CreatePlatformServiceProvider, + base::Passed(mojo::MakeRequest( + pipe.handle1.Pass())))); + return mojo::MakeProxy( + mojo::InterfacePtrInfo(pipe.handle0.Pass(), 0u)); +} + +} // namespace shell +} // namespace sky diff --git a/shell/android/platform_service_provider.h b/shell/android/platform_service_provider.h new file mode 100644 index 00000000000..679c7640e8a --- /dev/null +++ b/shell/android/platform_service_provider.h @@ -0,0 +1,18 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SKY_SHELL_ANDROID_PLATFORM_SERVICE_PROVIDER_H_ +#define SKY_SHELL_ANDROID_PLATFORM_SERVICE_PROVIDER_H_ + +#include + +namespace sky { +namespace shell { + +bool RegisterPlatformServiceProvider(JNIEnv* env); + +} // namespace shell +} // namespace sky + +#endif // SKY_SHELL_ANDROID_PLATFORM_SERVICE_PROVIDER_H_ diff --git a/shell/platform_view.cc b/shell/android/platform_view.cc similarity index 98% rename from shell/platform_view.cc rename to shell/android/platform_view.cc index cc98beb22cb..1fae4f11d73 100644 --- a/shell/platform_view.cc +++ b/shell/android/platform_view.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "sky/shell/platform_view.h" +#include "sky/shell/android/platform_view.h" #include #include diff --git a/shell/platform_view.h b/shell/android/platform_view.h similarity index 100% rename from shell/platform_view.h rename to shell/android/platform_view.h diff --git a/shell/sky_main.cc b/shell/android/sky_main.cc similarity index 90% rename from shell/sky_main.cc rename to shell/android/sky_main.cc index 4a10ab0df3f..98118282dbd 100644 --- a/shell/sky_main.cc +++ b/shell/android/sky_main.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "sky/shell/sky_main.h" +#include "sky/shell/android/sky_main.h" #include "base/android/jni_android.h" #include "base/android/jni_array.h" @@ -18,6 +18,7 @@ #include "base/run_loop.h" #include "base/threading/simple_thread.h" #include "jni/SkyMain_jni.h" +#include "sky/shell/service_provider.h" #include "sky/shell/shell.h" #include "ui/gl/gl_surface_egl.h" @@ -57,7 +58,8 @@ static void Init(JNIEnv* env, jclass clazz, jobject context) { base::i18n::InitializeICU(); gfx::GLSurface::InitializeOneOff(); - Shell::Init(g_java_message_loop.Get()->task_runner()); + Shell::Init(make_scoped_ptr(new ServiceProviderContext( + g_java_message_loop.Get()->task_runner()))); } bool RegisterSkyMain(JNIEnv* env) { diff --git a/shell/sky_main.h b/shell/android/sky_main.h similarity index 100% rename from shell/sky_main.h rename to shell/android/sky_main.h diff --git a/shell/tracing_controller.cc b/shell/android/tracing_controller.cc similarity index 97% rename from shell/tracing_controller.cc rename to shell/android/tracing_controller.cc index e22e1a3866b..ba2abdd5d2f 100644 --- a/shell/tracing_controller.cc +++ b/shell/android/tracing_controller.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "sky/shell/tracing_controller.h" +#include "sky/shell/android/tracing_controller.h" #include "base/android/jni_android.h" #include "base/android/jni_string.h" diff --git a/shell/tracing_controller.h b/shell/android/tracing_controller.h similarity index 100% rename from shell/tracing_controller.h rename to shell/android/tracing_controller.h diff --git a/shell/java_service_provider.cc b/shell/java_service_provider.cc deleted file mode 100644 index be2c2fbf092..00000000000 --- a/shell/java_service_provider.cc +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "sky/shell/java_service_provider.h" - -#include "base/android/jni_android.h" -#include "jni/JavaServiceProvider_jni.h" -#include "mojo/public/cpp/bindings/interface_request.h" - -namespace sky { -namespace shell { - -bool RegisterJavaServiceProvider(JNIEnv* env) { - return RegisterNativesImpl(env); -} - -void CreateJavaServiceProvider( - mojo::InterfaceRequest request) { - Java_JavaServiceProvider_create( - base::android::AttachCurrentThread(), - base::android::GetApplicationContext(), - request.PassMessagePipe().release().value()); -} - -} // namespace shell -} // namespace sky diff --git a/shell/java_service_provider.h b/shell/java_service_provider.h deleted file mode 100644 index 59851eddd3f..00000000000 --- a/shell/java_service_provider.h +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef SKY_SHELL_SERVICE_PROVIDER_IMPL_H_ -#define SKY_SHELL_SERVICE_PROVIDER_IMPL_H_ - -#include -#include "mojo/public/cpp/system/core.h" -#include "mojo/public/interfaces/application/service_provider.mojom.h" - -namespace sky { -namespace shell { - -bool RegisterJavaServiceProvider(JNIEnv* env); -void CreateJavaServiceProvider(mojo::InterfaceRequest); - -} // namespace shell -} // namespace sky - -#endif // SKY_SHELL_SERVICE_PROVIDER_IMPL_H_ diff --git a/shell/service_provider.h b/shell/service_provider.h new file mode 100644 index 00000000000..87460b8c4b3 --- /dev/null +++ b/shell/service_provider.h @@ -0,0 +1,36 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SKY_SHELL_SERVICE_PROVIDER_H_ +#define SKY_SHELL_SERVICE_PROVIDER_H_ + +#include "base/memory/ref_counted.h" +#include "mojo/public/cpp/system/core.h" +#include "mojo/public/interfaces/application/service_provider.mojom.h" + +namespace base { +class SingleThreadTaskRunner; +} + +namespace sky { +namespace shell { + +class ServiceProviderContext { + public: +#if defined(OS_ANDROID) + ServiceProviderContext( + scoped_refptr runner) + : java_task_runner(runner.Pass()) {} + + scoped_refptr java_task_runner; +#endif +}; + +// Implemented in platform_service_provider.cc for each platform. +mojo::ServiceProviderPtr CreateServiceProvider(ServiceProviderContext* context); + +} // namespace shell +} // namespace sky + +#endif // SKY_SHELL_SERVICE_PROVIDER_H_ diff --git a/shell/shell.cc b/shell/shell.cc index cc071522ae0..5e6851b4d87 100644 --- a/shell/shell.cc +++ b/shell/shell.cc @@ -9,9 +9,9 @@ #include "mojo/common/message_pump_mojo.h" #include "mojo/edk/embedder/embedder.h" #include "mojo/edk/embedder/simple_platform_support.h" +#include "sky/shell/android/platform_service_provider.h" +#include "sky/shell/android/platform_view.h" #include "sky/shell/gpu/rasterizer.h" -#include "sky/shell/java_service_provider.h" -#include "sky/shell/platform_view.h" #include "sky/shell/ui/engine.h" namespace sky { @@ -26,8 +26,8 @@ scoped_ptr CreateMessagePumpMojo() { } // namespace -Shell::Shell(scoped_refptr java_task_runner) - : java_task_runner_(java_task_runner) { +Shell::Shell(scoped_ptr service_provider_context) + : service_provider_context_(service_provider_context.Pass()) { DCHECK(!g_shell); mojo::embedder::Init(scoped_ptr( new mojo::embedder::SimplePlatformSupport())); @@ -43,8 +43,8 @@ Shell::Shell(scoped_refptr java_task_runner) Shell::~Shell() { } -void Shell::Init(scoped_refptr java_task_runner) { - g_shell = new Shell(java_task_runner); +void Shell::Init(scoped_ptr service_provider_context) { + g_shell = new Shell(service_provider_context.Pass()); } Shell& Shell::Shared() { @@ -64,7 +64,7 @@ void Shell::InitUI(const base::Thread::Options& options) { ui_thread_->StartWithOptions(options); Engine::Config config; - config.java_task_runner = java_task_runner_; + config.service_provider_context = service_provider_context_.get(); config.gpu_task_runner = gpu_thread_->message_loop()->task_runner(); config.gpu_delegate = rasterizer_->GetWeakPtr(); engine_.reset(new Engine(config)); diff --git a/shell/shell.h b/shell/shell.h index 4ac112c1fff..558468d17ea 100644 --- a/shell/shell.h +++ b/shell/shell.h @@ -10,34 +10,30 @@ #include "base/memory/scoped_ptr.h" #include "base/threading/thread.h" -namespace base { -class SingleThreadTaskRunner; -} - namespace sky { namespace shell { class Engine; -class Rasterizer; class PlatformView; +class Rasterizer; +class ServiceProviderContext; class Shell { public: ~Shell(); static void Init( - scoped_refptr java_task_runner); + scoped_ptr service_provider_context); static Shell& Shared(); PlatformView* view() const { return view_.get(); } private: - explicit Shell(scoped_refptr java_task_runner); + explicit Shell(scoped_ptr service_provider_context); void InitGPU(const base::Thread::Options& options); void InitUI(const base::Thread::Options& options); void InitView(); - scoped_refptr java_task_runner_; scoped_ptr gpu_thread_; scoped_ptr ui_thread_; @@ -45,6 +41,8 @@ class Shell { scoped_ptr rasterizer_; scoped_ptr engine_; + scoped_ptr service_provider_context_; + DISALLOW_COPY_AND_ASSIGN(Shell); }; diff --git a/shell/ui/engine.cc b/shell/ui/engine.cc index df145d61760..c0e464e319a 100644 --- a/shell/ui/engine.cc +++ b/shell/ui/engine.cc @@ -13,7 +13,7 @@ #include "sky/engine/public/web/WebSettings.h" #include "sky/engine/public/web/WebView.h" #include "sky/services/platform/platform_impl.h" -#include "sky/shell/java_service_provider.h" +#include "sky/shell/service_provider.h" #include "sky/shell/ui/animator.h" #include "sky/shell/ui/input_event_converter.h" #include "sky/shell/ui/internals.h" @@ -51,21 +51,10 @@ base::WeakPtr Engine::GetWeakPtr() { return weak_factory_.GetWeakPtr(); } -mojo::ServiceProviderPtr Engine::CreateServiceProvider() { - mojo::MessagePipe pipe; - config_.java_task_runner->PostTask( - FROM_HERE, - base::Bind(CreateJavaServiceProvider, - base::Passed(mojo::MakeRequest( - pipe.handle1.Pass())))); - return mojo::MakeProxy( - mojo::InterfacePtrInfo(pipe.handle0.Pass(), 0u)); -} - void Engine::Init() { TRACE_EVENT0("sky", "Engine::Init"); - service_provider_ = CreateServiceProvider(); + service_provider_ = CreateServiceProvider(config_.service_provider_context); mojo::NetworkServicePtr network_service; mojo::ConnectToService(service_provider_.get(), &network_service); platform_impl_.reset(new PlatformImpl(network_service.Pass())); @@ -178,7 +167,8 @@ void Engine::scheduleVisualUpdate() { void Engine::didCreateIsolate(blink::WebLocalFrame* frame, Dart_Isolate isolate) { - Internals::Create(isolate, CreateServiceProvider()); + Internals::Create(isolate, + CreateServiceProvider(config_.service_provider_context)); } blink::ServiceProvider* Engine::services() { diff --git a/shell/ui/engine.h b/shell/ui/engine.h index d888fb7168c..97f485b7c37 100644 --- a/shell/ui/engine.h +++ b/shell/ui/engine.h @@ -19,6 +19,7 @@ #include "sky/engine/public/web/WebViewClient.h" #include "sky/shell/gpu_delegate.h" #include "sky/shell/ui_delegate.h" +#include "sky/shell/service_provider.h" #include "third_party/skia/include/core/SkPicture.h" #include "ui/gfx/geometry/size.h" @@ -35,7 +36,7 @@ class Engine : public UIDelegate, public blink::WebViewClient { public: struct Config { - scoped_refptr java_task_runner; + ServiceProviderContext* service_provider_context; base::WeakPtr gpu_delegate; scoped_refptr gpu_task_runner; @@ -82,7 +83,6 @@ class Engine : public UIDelegate, void DidNavigateLocally(const mojo::String& url) override; void RequestNavigateHistory(int32_t delta) override; - mojo::ServiceProviderPtr CreateServiceProvider(); void UpdateWebViewSize(); Config config_;