mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Refactor how we wire up platform services
Now the control flow for wiring up platform services starts in the platform-specific code. Previously we started in shared code, which was imposing constraints on the startup sequence for all platforms. Now that we start in platform-specific code, we'll be able to add better support for Mojo in a future patch.
This commit is contained in:
parent
3082e82586
commit
9dc71cb51f
@ -11,6 +11,7 @@ mojom("interfaces") {
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//mojo/public/interfaces/application",
|
||||
"//mojo/services/asset_bundle/interfaces",
|
||||
"//sky/services/pointer:interfaces",
|
||||
]
|
||||
|
||||
@ -4,6 +4,8 @@
|
||||
|
||||
module sky;
|
||||
|
||||
import "mojo/public/interfaces/application/service_provider.mojom";
|
||||
import "mojo/public/interfaces/application/shell.mojom";
|
||||
import "mojo/services/asset_bundle/interfaces/asset_bundle.mojom";
|
||||
import "sky/services/engine/input_event.mojom";
|
||||
import "sky/services/pointer/pointer.mojom";
|
||||
@ -18,7 +20,15 @@ struct ViewportMetrics {
|
||||
double padding_left;
|
||||
};
|
||||
|
||||
struct ServicesData {
|
||||
mojo.Shell? shell;
|
||||
mojo.ServiceProvider? services_provided_by_embedder;
|
||||
mojo.ServiceProvider&? services_provided_to_embedder;
|
||||
};
|
||||
|
||||
interface SkyEngine {
|
||||
SetServices(ServicesData services);
|
||||
|
||||
OnActivityPaused();
|
||||
OnActivityResumed();
|
||||
|
||||
|
||||
@ -10,8 +10,6 @@ source_set("common") {
|
||||
"rasterizer.h",
|
||||
"platform_view.cc",
|
||||
"platform_view.h",
|
||||
"service_provider.cc",
|
||||
"service_provider.h",
|
||||
"shell.cc",
|
||||
"shell.h",
|
||||
"shell_view.cc",
|
||||
@ -114,7 +112,6 @@ if (is_android) {
|
||||
|
||||
generate_jni("jni_headers") {
|
||||
sources = [
|
||||
"platform/android/org/domokit/sky/shell/PlatformServiceProvider.java",
|
||||
"platform/android/org/domokit/sky/shell/PlatformViewAndroid.java",
|
||||
"platform/android/org/domokit/sky/shell/SkyMain.java",
|
||||
"platform/android/org/domokit/sky/shell/TracingController.java",
|
||||
@ -126,8 +123,6 @@ if (is_android) {
|
||||
shared_library("sky_shell") {
|
||||
sources = [
|
||||
"platform/android/library_loader.cc",
|
||||
"platform/android/platform_service_provider_android.cc",
|
||||
"platform/android/platform_service_provider_android.h",
|
||||
"platform/android/platform_view_android.cc",
|
||||
"platform/android/platform_view_android.h",
|
||||
"platform/android/sky_main.cc",
|
||||
@ -239,7 +234,8 @@ if (is_android) {
|
||||
sources += [
|
||||
"platform/mac/platform_mac.h",
|
||||
"platform/mac/platform_mac.mm",
|
||||
"platform/mac/platform_service_provider_mac.cc",
|
||||
"platform/mac/platform_service_provider.cc",
|
||||
"platform/mac/platform_service_provider.h",
|
||||
"platform/mac/platform_view_mac.h",
|
||||
"platform/mac/platform_view_mac.mm",
|
||||
]
|
||||
@ -265,7 +261,6 @@ if (is_android) {
|
||||
|
||||
sources = [
|
||||
"platform/linux/main_linux.cc",
|
||||
"platform/linux/platform_service_provider_linux.cc",
|
||||
"platform/linux/platform_view_linux.cc",
|
||||
]
|
||||
|
||||
@ -285,7 +280,8 @@ if (is_android) {
|
||||
"platform/mac/main_mac.mm",
|
||||
"platform/mac/platform_mac.h",
|
||||
"platform/mac/platform_mac.mm",
|
||||
"platform/mac/platform_service_provider_mac.cc",
|
||||
"platform/mac/platform_service_provider.cc",
|
||||
"platform/mac/platform_service_provider.h",
|
||||
"platform/mac/platform_view_mac.h",
|
||||
"platform/mac/platform_view_mac.mm",
|
||||
"platform/mac/sky_app_delegate.h",
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
#include "base/logging.h"
|
||||
#include "mojo/android/system/base_run_loop.h"
|
||||
#include "mojo/android/system/core_impl.h"
|
||||
#include "sky/shell/platform/android/platform_service_provider_android.h"
|
||||
#include "sky/shell/platform/android/platform_view_android.h"
|
||||
#include "sky/shell/platform/android/sky_main.h"
|
||||
#include "sky/shell/platform/android/tracing_controller.h"
|
||||
@ -22,7 +21,6 @@ namespace {
|
||||
base::android::RegistrationMethod kSkyRegisteredMethods[] = {
|
||||
{"CoreImpl", mojo::android::RegisterCoreImpl},
|
||||
{"BaseRunLoop", mojo::android::RegisterBaseRunLoop},
|
||||
{"PlatformServiceProvider", sky::shell::RegisterPlatformServiceProvider},
|
||||
{"PlatformViewAndroid", sky::shell::PlatformViewAndroid::Register},
|
||||
{"SkyMain", sky::shell::RegisterSkyMain},
|
||||
{"TracingController", sky::shell::RegisterTracingController},
|
||||
|
||||
@ -6,8 +6,6 @@ package org.domokit.sky.shell;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import org.chromium.base.CalledByNative;
|
||||
import org.chromium.base.JNINamespace;
|
||||
import org.chromium.mojo.system.Core;
|
||||
import org.chromium.mojo.system.MessagePipeHandle;
|
||||
import org.chromium.mojo.system.MojoException;
|
||||
@ -17,19 +15,10 @@ import org.chromium.mojom.mojo.ServiceProvider;
|
||||
/**
|
||||
* A collection of services implemented in Java.
|
||||
**/
|
||||
@JNINamespace("sky::shell")
|
||||
public class PlatformServiceProvider implements ServiceProvider {
|
||||
private Core mCore;
|
||||
private Context mContext;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@CalledByNative
|
||||
public static void create(Context context, int nativeHandle) {
|
||||
Core core = CoreImpl.getInstance();
|
||||
MessagePipeHandle pipe = core.acquireNativeHandle(nativeHandle).toMessagePipeHandle();
|
||||
ServiceProvider.MANAGER.bind(new PlatformServiceProvider(core, context), pipe);
|
||||
}
|
||||
|
||||
public PlatformServiceProvider(Core core, Context context) {
|
||||
assert core != null;
|
||||
assert context != null;
|
||||
|
||||
@ -28,6 +28,8 @@ import org.chromium.mojom.pointer.PointerPacket;
|
||||
import org.chromium.mojom.pointer.PointerType;
|
||||
import org.chromium.mojom.sky.SkyEngine;
|
||||
import org.chromium.mojom.sky.ViewportMetrics;
|
||||
import org.chromium.mojom.sky.ServicesData;
|
||||
import org.chromium.mojom.mojo.ServiceProvider;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -44,6 +46,7 @@ public class PlatformViewAndroid extends SurfaceView {
|
||||
|
||||
private long mNativePlatformView;
|
||||
private SkyEngine.Proxy mSkyEngine;
|
||||
private PlatformServiceProvider mServiceProvider;
|
||||
private final SurfaceHolder.Callback mSurfaceCallback;
|
||||
private final EdgeDims mPadding;
|
||||
private final KeyboardServiceState mKeyboardState;
|
||||
@ -257,10 +260,19 @@ public class PlatformViewAndroid extends SurfaceView {
|
||||
|
||||
private void attach() {
|
||||
Core core = CoreImpl.getInstance();
|
||||
Pair<SkyEngine.Proxy, InterfaceRequest<SkyEngine>> result =
|
||||
Pair<SkyEngine.Proxy, InterfaceRequest<SkyEngine>> engine =
|
||||
SkyEngine.MANAGER.getInterfaceRequest(core);
|
||||
mSkyEngine = result.first;
|
||||
mNativePlatformView = nativeAttach(result.second.passHandle().releaseNativeHandle());
|
||||
mSkyEngine = engine.first;
|
||||
mNativePlatformView = nativeAttach(engine.second.passHandle().releaseNativeHandle());
|
||||
|
||||
Pair<ServiceProvider.Proxy, InterfaceRequest<ServiceProvider>> serviceProvider =
|
||||
ServiceProvider.MANAGER.getInterfaceRequest(core);
|
||||
mServiceProvider = new PlatformServiceProvider(core, getContext());
|
||||
ServiceProvider.MANAGER.bind(mServiceProvider, serviceProvider.second);
|
||||
|
||||
ServicesData services = new ServicesData();
|
||||
services.servicesProvidedByEmbedder = serviceProvider.first;
|
||||
mSkyEngine.setServices(services);
|
||||
}
|
||||
|
||||
private static native long nativeAttach(int inputObserverHandle);
|
||||
|
||||
@ -1,45 +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/platform/android/platform_service_provider_android.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<mojo::ServiceProvider> 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->platform_task_runner->PostTask(
|
||||
FROM_HERE,
|
||||
base::Bind(CreatePlatformServiceProvider,
|
||||
base::Passed(mojo::MakeRequest<mojo::ServiceProvider>(
|
||||
pipe.handle1.Pass()))));
|
||||
return mojo::MakeProxy(
|
||||
mojo::InterfacePtrInfo<mojo::ServiceProvider>(pipe.handle0.Pass(), 0u));
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace sky
|
||||
@ -1,18 +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_PLATFORM_SERVICE_PROVIDER_ANDROID_H_
|
||||
#define SKY_SHELL_PLATFORM_SERVICE_PROVIDER_ANDROID_H_
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
namespace sky {
|
||||
namespace shell {
|
||||
|
||||
bool RegisterPlatformServiceProvider(JNIEnv* env);
|
||||
|
||||
} // namespace shell
|
||||
} // namespace sky
|
||||
|
||||
#endif // SKY_SHELL_PLATFORM_SERVICE_PROVIDER_ANDROID_H_
|
||||
@ -21,7 +21,6 @@
|
||||
#include "jni/SkyMain_jni.h"
|
||||
#include "mojo/edk/embedder/embedder.h"
|
||||
#include "mojo/edk/embedder/simple_platform_support.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
#include "sky/shell/shell.h"
|
||||
|
||||
using base::LazyInstance;
|
||||
@ -78,8 +77,7 @@ static void Init(JNIEnv* env,
|
||||
mojo::embedder::Init(std::unique_ptr<mojo::embedder::PlatformSupport>(
|
||||
new mojo::embedder::SimplePlatformSupport()));
|
||||
|
||||
Shell::InitStandalone(make_scoped_ptr(new ServiceProviderContext(
|
||||
g_java_message_loop.Get()->task_runner())));
|
||||
Shell::InitStandalone();
|
||||
|
||||
InitializeTracing();
|
||||
}
|
||||
|
||||
@ -39,9 +39,7 @@ void UpdateTaskAndroid::Start() {
|
||||
}
|
||||
|
||||
void UpdateTaskAndroid::DidCreateIsolate(Dart_Isolate isolate) {
|
||||
Internals::Create(isolate, CreateServiceProvider(
|
||||
Shell::Shared().service_provider_context()),
|
||||
nullptr);
|
||||
Internals::Create(isolate, nullptr, nullptr);
|
||||
}
|
||||
|
||||
void UpdateTaskAndroid::RunDartOnUIThread() {
|
||||
|
||||
@ -12,9 +12,10 @@
|
||||
#include "mojo/public/cpp/bindings/interface_request.h"
|
||||
#include "sky/services/engine/input_event.mojom.h"
|
||||
#include "sky/services/pointer/pointer.mojom.h"
|
||||
#include "sky/shell/platform/mac/platform_service_provider.h"
|
||||
#include "sky/shell/platform/mac/platform_view_mac.h"
|
||||
#include "sky/shell/shell_view.h"
|
||||
#include "sky/shell/shell.h"
|
||||
#include "sky/shell/shell_view.h"
|
||||
#include "sky/shell/ui_delegate.h"
|
||||
#include <strings.h>
|
||||
|
||||
@ -184,8 +185,14 @@ static std::string SkPictureTracingPath() {
|
||||
}
|
||||
|
||||
- (void)connectToEngineAndLoad {
|
||||
auto interface_request = mojo::GetProxy(&_sky_engine);
|
||||
self.platformView->ConnectToEngine(interface_request.Pass());
|
||||
self.platformView->ConnectToEngine(mojo::GetProxy(&_sky_engine));
|
||||
|
||||
mojo::ServiceProviderPtr service_provider;
|
||||
new sky::shell::PlatformServiceProvider(mojo::GetProxy(&service_provider));
|
||||
sky::ServicesDataPtr services = sky::ServicesData::New();
|
||||
services->services_provided_by_embedder = service_provider.Pass();
|
||||
_sky_engine->SetServices(services.Pass());
|
||||
|
||||
mojo::String bundle_path([self flxBundlePath]);
|
||||
_sky_engine->RunFromPrecompiledSnapshot(bundle_path);
|
||||
}
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "mojo/edk/embedder/embedder.h"
|
||||
#include "mojo/edk/embedder/simple_platform_support.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
#include "sky/shell/shell.h"
|
||||
#include "sky/shell/switches.h"
|
||||
#include "sky/shell/testing/testing.h"
|
||||
@ -31,8 +30,7 @@ int main(int argc, const char* argv[]) {
|
||||
mojo::embedder::Init(std::unique_ptr<mojo::embedder::PlatformSupport>(
|
||||
new mojo::embedder::SimplePlatformSupport()));
|
||||
|
||||
sky::shell::Shell::InitStandalone(make_scoped_ptr(
|
||||
new sky::shell::ServiceProviderContext(message_loop.task_runner())));
|
||||
sky::shell::Shell::InitStandalone();
|
||||
|
||||
if (!sky::shell::InitForTesting()) {
|
||||
sky::shell::switches::PrintUsage("sky_shell");
|
||||
|
||||
@ -1,51 +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 "base/bind.h"
|
||||
#include "base/bind_helpers.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/location.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "mojo/public/cpp/bindings/strong_binding.h"
|
||||
#include "mojo/public/interfaces/application/service_provider.mojom.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
#include "sky/shell/testing/test_runner.h"
|
||||
|
||||
namespace sky {
|
||||
namespace shell {
|
||||
namespace {
|
||||
|
||||
class PlatformServiceProvider : public mojo::ServiceProvider {
|
||||
public:
|
||||
PlatformServiceProvider(mojo::InterfaceRequest<mojo::ServiceProvider> request)
|
||||
: binding_(this, request.Pass()) {}
|
||||
|
||||
void ConnectToService(const mojo::String& service_name,
|
||||
mojo::ScopedMessagePipeHandle client_handle) override {
|
||||
}
|
||||
|
||||
private:
|
||||
mojo::StrongBinding<mojo::ServiceProvider> binding_;
|
||||
};
|
||||
|
||||
static void CreatePlatformServiceProvider(
|
||||
mojo::InterfaceRequest<mojo::ServiceProvider> request) {
|
||||
new PlatformServiceProvider(request.Pass());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
mojo::ServiceProviderPtr CreateServiceProvider(
|
||||
ServiceProviderContext* context) {
|
||||
DCHECK(context);
|
||||
mojo::MessagePipe pipe;
|
||||
auto request = mojo::MakeRequest<mojo::ServiceProvider>(pipe.handle1.Pass());
|
||||
context->platform_task_runner->PostTask(
|
||||
FROM_HERE, base::Bind(CreatePlatformServiceProvider, base::Passed(&request)));
|
||||
return mojo::MakeProxy(
|
||||
mojo::InterfacePtrInfo<mojo::ServiceProvider>(pipe.handle0.Pass(), 0u));
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace sky
|
||||
@ -14,7 +14,6 @@
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "mojo/edk/embedder/embedder.h"
|
||||
#include "mojo/edk/embedder/simple_platform_support.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
#include "sky/shell/shell.h"
|
||||
#include "sky/shell/ui_delegate.h"
|
||||
#include "ui/gl/gl_surface.h"
|
||||
@ -65,8 +64,7 @@ int PlatformMacMain(int argc,
|
||||
mojo::embedder::Init(std::unique_ptr<mojo::embedder::PlatformSupport>(
|
||||
new mojo::embedder::SimplePlatformSupport()));
|
||||
|
||||
sky::shell::Shell::InitStandalone(make_scoped_ptr(
|
||||
new sky::shell::ServiceProviderContext(message_loop->task_runner())));
|
||||
sky::shell::Shell::InitStandalone();
|
||||
|
||||
result = callback();
|
||||
|
||||
|
||||
46
sky/shell/platform/mac/platform_service_provider.cc
Normal file
46
sky/shell/platform/mac/platform_service_provider.cc
Normal file
@ -0,0 +1,46 @@
|
||||
// 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/platform/mac/platform_service_provider.h"
|
||||
|
||||
namespace sky {
|
||||
namespace shell {
|
||||
|
||||
PlatformServiceProvider::PlatformServiceProvider(
|
||||
mojo::InterfaceRequest<mojo::ServiceProvider> request)
|
||||
: binding_(this, request.Pass()) {
|
||||
}
|
||||
|
||||
PlatformServiceProvider::~PlatformServiceProvider() {
|
||||
}
|
||||
|
||||
void PlatformServiceProvider::ConnectToService(
|
||||
const mojo::String& service_name,
|
||||
mojo::ScopedMessagePipeHandle client_handle) {
|
||||
if (service_name == mojo::NetworkService::Name_) {
|
||||
network_.Create(nullptr, mojo::MakeRequest<mojo::NetworkService>(
|
||||
client_handle.Pass()));
|
||||
}
|
||||
#if TARGET_OS_IPHONE
|
||||
if (service_name == ::keyboard::KeyboardService::Name_) {
|
||||
keyboard_.Create(nullptr, mojo::MakeRequest<::keyboard::KeyboardService>(
|
||||
client_handle.Pass()));
|
||||
}
|
||||
if (service_name == ::media::MediaPlayer::Name_) {
|
||||
media_player_.Create(nullptr, mojo::MakeRequest<::media::MediaPlayer>(
|
||||
client_handle.Pass()));
|
||||
}
|
||||
if (service_name == ::media::MediaService::Name_) {
|
||||
media_service_.Create(nullptr, mojo::MakeRequest<::media::MediaService>(
|
||||
client_handle.Pass()));
|
||||
}
|
||||
if (service_name == ::vsync::VSyncProvider::Name_) {
|
||||
vsync_.Create(nullptr, mojo::MakeRequest<::vsync::VSyncProvider>(
|
||||
client_handle.Pass()));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace sky
|
||||
50
sky/shell/platform/mac/platform_service_provider.h
Normal file
50
sky/shell/platform/mac/platform_service_provider.h
Normal file
@ -0,0 +1,50 @@
|
||||
// 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_PLATFORM_MAC_SERVICE_PROVIDER_H_
|
||||
#define SKY_SHELL_PLATFORM_MAC_SERVICE_PROVIDER_H_
|
||||
|
||||
#include "mojo/public/interfaces/application/service_provider.mojom.h"
|
||||
#include "sky/engine/wtf/Assertions.h"
|
||||
#include "sky/services/ns_net/network_service_impl.h"
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#include "sky/services/keyboard/ios/keyboard_service_impl.h"
|
||||
#include "sky/services/media/ios/media_service_impl.h"
|
||||
#include "sky/services/media/ios/media_player_impl.h"
|
||||
#include "sky/services/vsync/ios/vsync_provider_impl.h"
|
||||
#endif
|
||||
|
||||
#if !TARGET_OS_IPHONE
|
||||
#include "sky/shell/testing/test_runner.h"
|
||||
#endif
|
||||
|
||||
namespace sky {
|
||||
namespace shell {
|
||||
|
||||
class PlatformServiceProvider : public mojo::ServiceProvider {
|
||||
public:
|
||||
PlatformServiceProvider(mojo::InterfaceRequest<mojo::ServiceProvider> request);
|
||||
~PlatformServiceProvider() override;
|
||||
|
||||
void ConnectToService(const mojo::String& service_name,
|
||||
mojo::ScopedMessagePipeHandle client_handle) override;
|
||||
|
||||
private:
|
||||
mojo::StrongBinding<mojo::ServiceProvider> binding_;
|
||||
mojo::NetworkServiceFactory network_;
|
||||
#if TARGET_OS_IPHONE
|
||||
sky::services::keyboard::KeyboardServiceFactory keyboard_;
|
||||
sky::services::media::MediaPlayerFactory media_player_;
|
||||
sky::services::media::MediaServiceFactory media_service_;
|
||||
sky::services::vsync::VSyncProviderFactory vsync_;
|
||||
#endif
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(PlatformServiceProvider);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace sky
|
||||
|
||||
#endif // SKY_SHELL_PLATFORM_MAC_SERVICE_PROVIDER_H_
|
||||
@ -1,89 +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 "base/bind.h"
|
||||
#include "base/bind_helpers.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/location.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "mojo/public/interfaces/application/service_provider.mojom.h"
|
||||
#include "sky/engine/wtf/Assertions.h"
|
||||
#include "sky/services/ns_net/network_service_impl.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#include "sky/services/keyboard/ios/keyboard_service_impl.h"
|
||||
#include "sky/services/media/ios/media_service_impl.h"
|
||||
#include "sky/services/media/ios/media_player_impl.h"
|
||||
#include "sky/services/vsync/ios/vsync_provider_impl.h"
|
||||
#endif
|
||||
|
||||
#if !TARGET_OS_IPHONE
|
||||
#include "sky/shell/testing/test_runner.h"
|
||||
#endif
|
||||
|
||||
namespace sky {
|
||||
namespace shell {
|
||||
|
||||
class PlatformServiceProvider : public mojo::ServiceProvider {
|
||||
public:
|
||||
PlatformServiceProvider(mojo::InterfaceRequest<mojo::ServiceProvider> request)
|
||||
: binding_(this, request.Pass()) {}
|
||||
|
||||
void ConnectToService(const mojo::String& service_name,
|
||||
mojo::ScopedMessagePipeHandle client_handle) override {
|
||||
if (service_name == mojo::NetworkService::Name_) {
|
||||
network_.Create(nullptr, mojo::MakeRequest<mojo::NetworkService>(
|
||||
client_handle.Pass()));
|
||||
}
|
||||
#if TARGET_OS_IPHONE
|
||||
if (service_name == ::keyboard::KeyboardService::Name_) {
|
||||
keyboard_.Create(nullptr, mojo::MakeRequest<::keyboard::KeyboardService>(
|
||||
client_handle.Pass()));
|
||||
}
|
||||
if (service_name == ::media::MediaPlayer::Name_) {
|
||||
media_player_.Create(nullptr, mojo::MakeRequest<::media::MediaPlayer>(
|
||||
client_handle.Pass()));
|
||||
}
|
||||
if (service_name == ::media::MediaService::Name_) {
|
||||
media_service_.Create(nullptr, mojo::MakeRequest<::media::MediaService>(
|
||||
client_handle.Pass()));
|
||||
}
|
||||
if (service_name == ::vsync::VSyncProvider::Name_) {
|
||||
vsync_.Create(nullptr, mojo::MakeRequest<::vsync::VSyncProvider>(
|
||||
client_handle.Pass()));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
mojo::StrongBinding<mojo::ServiceProvider> binding_;
|
||||
mojo::NetworkServiceFactory network_;
|
||||
#if TARGET_OS_IPHONE
|
||||
sky::services::keyboard::KeyboardServiceFactory keyboard_;
|
||||
sky::services::media::MediaPlayerFactory media_player_;
|
||||
sky::services::media::MediaServiceFactory media_service_;
|
||||
sky::services::vsync::VSyncProviderFactory vsync_;
|
||||
#endif
|
||||
};
|
||||
|
||||
static void CreatePlatformServiceProvider(
|
||||
mojo::InterfaceRequest<mojo::ServiceProvider> request) {
|
||||
new PlatformServiceProvider(request.Pass());
|
||||
}
|
||||
|
||||
mojo::ServiceProviderPtr CreateServiceProvider(
|
||||
ServiceProviderContext* context) {
|
||||
DCHECK(context);
|
||||
mojo::MessagePipe pipe;
|
||||
auto request = mojo::MakeRequest<mojo::ServiceProvider>(pipe.handle1.Pass());
|
||||
context->platform_task_runner->PostTask(
|
||||
FROM_HERE,
|
||||
base::Bind(CreatePlatformServiceProvider, base::Passed(request.Pass())));
|
||||
return mojo::MakeProxy(
|
||||
mojo::InterfacePtrInfo<mojo::ServiceProvider>(pipe.handle0.Pass(), 0u));
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace sky
|
||||
@ -9,6 +9,7 @@
|
||||
#include "sky/services/engine/input_event.mojom.h"
|
||||
#include "sky/services/pointer/pointer.mojom.h"
|
||||
#include "sky/shell/platform/mac/platform_view_mac.h"
|
||||
#include "sky/shell/platform/mac/platform_service_provider.h"
|
||||
#include "sky/shell/shell_view.h"
|
||||
#include "sky/shell/shell.h"
|
||||
#include "sky/shell/switches.h"
|
||||
@ -76,8 +77,13 @@ static inline pointer::PointerType EventTypeFromNSEventPhase(NSEventPhase phase)
|
||||
// We also want a separate setup for normal apps vs SkyShell
|
||||
// normal apps only use a flx vs. SkyShell which always pulls from network.
|
||||
- (void)setupAndLoadDart {
|
||||
auto interface_request = mojo::GetProxy(&_sky_engine);
|
||||
self.platformView->ConnectToEngine(interface_request.Pass());
|
||||
self.platformView->ConnectToEngine(mojo::GetProxy(&_sky_engine));
|
||||
|
||||
mojo::ServiceProviderPtr service_provider;
|
||||
new sky::shell::PlatformServiceProvider(mojo::GetProxy(&service_provider));
|
||||
sky::ServicesDataPtr services = sky::ServicesData::New();
|
||||
services->services_provided_by_embedder = service_provider.Pass();
|
||||
_sky_engine->SetServices(services.Pass());
|
||||
|
||||
base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@ mojo_native_application("mojo") {
|
||||
"content_handler_impl.cc",
|
||||
"content_handler_impl.h",
|
||||
"main_mojo.cc",
|
||||
"platform_service_provider_mojo.cc",
|
||||
"platform_view_mojo.cc",
|
||||
"platform_view_mojo.h",
|
||||
"sky_application_impl.cc",
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
#include "mojo/public/cpp/application/interface_factory_impl.h"
|
||||
#include "mojo/services/content_handler/interfaces/content_handler.mojom.h"
|
||||
#include "sky/shell/shell.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
#include "sky/shell/platform/mojo/content_handler_impl.h"
|
||||
|
||||
namespace sky {
|
||||
@ -32,9 +31,7 @@ class MojoApp : public mojo::ApplicationDelegate,
|
||||
void Initialize(mojo::ApplicationImpl* app) override {
|
||||
mojo::icu::Initialize(app);
|
||||
tracing_.Initialize(app);
|
||||
|
||||
Shell::Init(make_scoped_ptr(
|
||||
new ServiceProviderContext(base::MessageLoop::current()->task_runner())));
|
||||
Shell::Init();
|
||||
}
|
||||
|
||||
bool ConfigureIncomingConnection(
|
||||
|
||||
@ -1,50 +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 "base/bind.h"
|
||||
#include "base/bind_helpers.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/location.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "mojo/public/cpp/bindings/strong_binding.h"
|
||||
#include "mojo/public/interfaces/application/service_provider.mojom.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
|
||||
namespace sky {
|
||||
namespace shell {
|
||||
namespace {
|
||||
|
||||
class PlatformServiceProvider : public mojo::ServiceProvider {
|
||||
public:
|
||||
PlatformServiceProvider(mojo::InterfaceRequest<mojo::ServiceProvider> request)
|
||||
: binding_(this, request.Pass()) {}
|
||||
|
||||
void ConnectToService(const mojo::String& service_name,
|
||||
mojo::ScopedMessagePipeHandle client_handle) override {
|
||||
}
|
||||
|
||||
private:
|
||||
mojo::StrongBinding<mojo::ServiceProvider> binding_;
|
||||
};
|
||||
|
||||
static void CreatePlatformServiceProvider(
|
||||
mojo::InterfaceRequest<mojo::ServiceProvider> request) {
|
||||
new PlatformServiceProvider(request.Pass());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
mojo::ServiceProviderPtr CreateServiceProvider(
|
||||
ServiceProviderContext* context) {
|
||||
DCHECK(context);
|
||||
mojo::MessagePipe pipe;
|
||||
auto request = mojo::MakeRequest<mojo::ServiceProvider>(pipe.handle1.Pass());
|
||||
context->platform_task_runner->PostTask(
|
||||
FROM_HERE, base::Bind(CreatePlatformServiceProvider, base::Passed(&request)));
|
||||
return mojo::MakeProxy(
|
||||
mojo::InterfacePtrInfo<mojo::ServiceProvider>(pipe.handle0.Pass(), 0u));
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace sky
|
||||
@ -1,20 +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/service_provider.h"
|
||||
|
||||
#include "base/single_thread_task_runner.h"
|
||||
|
||||
namespace sky {
|
||||
namespace shell {
|
||||
|
||||
ServiceProviderContext::ServiceProviderContext(
|
||||
scoped_refptr<base::SingleThreadTaskRunner> runner)
|
||||
: platform_task_runner(runner.Pass()) {}
|
||||
|
||||
ServiceProviderContext::~ServiceProviderContext() {
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace sky
|
||||
@ -1,33 +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_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:
|
||||
ServiceProviderContext(scoped_refptr<base::SingleThreadTaskRunner> runner);
|
||||
~ServiceProviderContext();
|
||||
|
||||
scoped_refptr<base::SingleThreadTaskRunner> platform_task_runner;
|
||||
};
|
||||
|
||||
// Implemented in platform_service_provider.cc for each platform.
|
||||
mojo::ServiceProviderPtr CreateServiceProvider(ServiceProviderContext* context);
|
||||
|
||||
} // namespace shell
|
||||
} // namespace sky
|
||||
|
||||
#endif // SKY_SHELL_SERVICE_PROVIDER_H_
|
||||
@ -49,8 +49,7 @@ base::LazyInstance<NonDiscardableMemoryAllocator> g_discardable;
|
||||
|
||||
} // namespace
|
||||
|
||||
Shell::Shell(scoped_ptr<ServiceProviderContext> service_provider_context)
|
||||
: service_provider_context_(service_provider_context.Pass()) {
|
||||
Shell::Shell() {
|
||||
DCHECK(!g_shell);
|
||||
|
||||
base::Thread::Options options;
|
||||
@ -74,19 +73,17 @@ Shell::Shell(scoped_ptr<ServiceProviderContext> service_provider_context)
|
||||
Shell::~Shell() {
|
||||
}
|
||||
|
||||
void Shell::InitStandalone(
|
||||
scoped_ptr<ServiceProviderContext> service_provider_context) {
|
||||
void Shell::InitStandalone() {
|
||||
CHECK(base::i18n::InitializeICU());
|
||||
#if !defined(OS_LINUX)
|
||||
CHECK(gfx::GLSurface::InitializeOneOff());
|
||||
#endif
|
||||
Init(service_provider_context.Pass());
|
||||
Init();
|
||||
}
|
||||
|
||||
void Shell::Init(scoped_ptr<ServiceProviderContext> service_provider_context) {
|
||||
void Shell::Init() {
|
||||
base::DiscardableMemoryAllocator::SetInstance(&g_discardable.Get());
|
||||
|
||||
g_shell = new Shell(service_provider_context.Pass());
|
||||
g_shell = new Shell();
|
||||
}
|
||||
|
||||
Shell& Shell::Shared() {
|
||||
|
||||
@ -10,23 +10,19 @@
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/threading/thread.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
#include "sky/shell/tracing_controller.h"
|
||||
|
||||
namespace sky {
|
||||
namespace shell {
|
||||
class ServiceProviderContext;
|
||||
|
||||
class Shell {
|
||||
public:
|
||||
~Shell();
|
||||
|
||||
// Init the shell to stand alone from MojoShell.
|
||||
static void InitStandalone(
|
||||
scoped_ptr<ServiceProviderContext> service_provider_context);
|
||||
static void InitStandalone();
|
||||
// Init the shell to run inside MojoShell.
|
||||
static void Init(
|
||||
scoped_ptr<ServiceProviderContext> service_provider_context);
|
||||
static void Init();
|
||||
|
||||
static Shell& Shared();
|
||||
|
||||
@ -42,14 +38,10 @@ class Shell {
|
||||
return io_task_runner_.get();
|
||||
}
|
||||
|
||||
ServiceProviderContext* service_provider_context() const {
|
||||
return service_provider_context_.get();
|
||||
}
|
||||
|
||||
TracingController& tracing_controller();
|
||||
|
||||
private:
|
||||
explicit Shell(scoped_ptr<ServiceProviderContext> service_provider_context);
|
||||
explicit Shell();
|
||||
|
||||
void InitGPU(const base::Thread::Options& options);
|
||||
void InitUI(const base::Thread::Options& options);
|
||||
@ -62,7 +54,6 @@ class Shell {
|
||||
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
|
||||
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
|
||||
|
||||
scoped_ptr<ServiceProviderContext> service_provider_context_;
|
||||
TracingController tracing_controller_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Shell);
|
||||
|
||||
@ -39,7 +39,6 @@ ShellView::~ShellView() {
|
||||
|
||||
void ShellView::CreateEngine() {
|
||||
Engine::Config config;
|
||||
config.service_provider_context = shell_.service_provider_context();
|
||||
config.gpu_task_runner = shell_.gpu_task_runner();
|
||||
config.raster_callback = rasterizer_->GetRasterCallback();
|
||||
engine_.reset(new Engine(config));
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
#include "sky/engine/public/web/WebRuntimeFeatures.h"
|
||||
#include "sky/shell/dart/dart_library_provider_files.h"
|
||||
#include "sky/shell/dart/dart_library_provider_network.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
#include "sky/shell/switches.h"
|
||||
#include "sky/shell/switches.h"
|
||||
#include "sky/shell/ui/animator.h"
|
||||
@ -64,15 +63,6 @@ Engine::Engine(const Config& config)
|
||||
activity_running_(false),
|
||||
have_surface_(false),
|
||||
weak_factory_(this) {
|
||||
mojo::ServiceProviderPtr service_provider =
|
||||
CreateServiceProvider(config.service_provider_context);
|
||||
|
||||
#if defined(OS_ANDROID) || defined(OS_IOS)
|
||||
// TODO(abarth): Implement VSyncProvider on other platforms.
|
||||
vsync::VSyncProviderPtr vsync_provider;
|
||||
mojo::ConnectToService(service_provider.get(), &vsync_provider);
|
||||
animator_->set_vsync_provider(vsync_provider.Pass());
|
||||
#endif
|
||||
}
|
||||
|
||||
Engine::~Engine() {
|
||||
@ -130,6 +120,17 @@ void Engine::OnOutputSurfaceDestroyed(const base::Closure& gpu_continuation) {
|
||||
config_.gpu_task_runner->PostTask(FROM_HERE, gpu_continuation);
|
||||
}
|
||||
|
||||
void Engine::SetServices(ServicesDataPtr services) {
|
||||
services_ = services.Pass();
|
||||
|
||||
#if defined(OS_ANDROID) || defined(OS_IOS)
|
||||
// TODO(abarth): Implement VSyncProvider on other platforms.
|
||||
vsync::VSyncProviderPtr vsync_provider;
|
||||
mojo::ConnectToService(services_->services_provided_by_embedder.get(), &vsync_provider);
|
||||
animator_->set_vsync_provider(vsync_provider.Pass());
|
||||
#endif
|
||||
}
|
||||
|
||||
void Engine::OnViewportMetricsChanged(ViewportMetricsPtr metrics) {
|
||||
physical_size_.SetSize(metrics->physical_width, metrics->physical_height);
|
||||
|
||||
@ -242,9 +243,7 @@ void Engine::OnActivityResumed() {
|
||||
}
|
||||
|
||||
void Engine::DidCreateIsolate(Dart_Isolate isolate) {
|
||||
Internals::Create(isolate,
|
||||
CreateServiceProvider(config_.service_provider_context),
|
||||
root_bundle_.Pass());
|
||||
Internals::Create(isolate, services_.Pass(), root_bundle_.Pass());
|
||||
}
|
||||
|
||||
void Engine::StopAnimator() {
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
#include "sky/engine/public/sky/sky_view.h"
|
||||
#include "sky/engine/public/sky/sky_view_client.h"
|
||||
#include "sky/shell/rasterizer.h"
|
||||
#include "sky/shell/service_provider.h"
|
||||
#include "sky/shell/ui_delegate.h"
|
||||
#include "third_party/skia/include/core/SkPicture.h"
|
||||
#include "ui/gfx/geometry/size.h"
|
||||
@ -37,8 +36,6 @@ class Engine : public UIDelegate,
|
||||
Config();
|
||||
~Config();
|
||||
|
||||
ServiceProviderContext* service_provider_context;
|
||||
|
||||
RasterCallback raster_callback;
|
||||
scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner;
|
||||
};
|
||||
@ -62,6 +59,7 @@ class Engine : public UIDelegate,
|
||||
void OnOutputSurfaceDestroyed(const base::Closure& gpu_continuation) override;
|
||||
|
||||
// SkyEngine implementation:
|
||||
void SetServices(ServicesDataPtr services) override;
|
||||
void OnViewportMetricsChanged(ViewportMetricsPtr metrics) override;
|
||||
void OnInputEvent(InputEventPtr event) override;
|
||||
void OnPointerPacket(pointer::PointerPacketPtr packet) override;
|
||||
@ -92,6 +90,7 @@ class Engine : public UIDelegate,
|
||||
Config config_;
|
||||
scoped_ptr<Animator> animator_;
|
||||
|
||||
ServicesDataPtr services_;
|
||||
mojo::asset_bundle::AssetBundlePtr root_bundle_;
|
||||
scoped_ptr<blink::DartLibraryProvider> dart_library_provider_;
|
||||
std::unique_ptr<blink::SkyView> sky_view_;
|
||||
|
||||
@ -77,12 +77,12 @@ const uint8_t* GetSymbol(Dart_NativeFunction native_function) {
|
||||
} // namespace
|
||||
|
||||
void Internals::Create(Dart_Isolate isolate,
|
||||
mojo::ServiceProviderPtr service_provider,
|
||||
ServicesDataPtr services,
|
||||
mojo::asset_bundle::AssetBundlePtr root_bundle) {
|
||||
EnsureNatives();
|
||||
|
||||
DartState* state = DartState::From(isolate);
|
||||
state->SetUserData(&kInternalsKey, new Internals(service_provider.Pass(),
|
||||
state->SetUserData(&kInternalsKey, new Internals(services.Pass(),
|
||||
root_bundle.Pass()));
|
||||
Dart_Handle library = Dart_LookupLibrary(ToDart("dart:ui_internals"));
|
||||
CHECK(!LogIfError(library));
|
||||
@ -90,14 +90,15 @@ void Internals::Create(Dart_Isolate isolate,
|
||||
library, GetNativeFunction, GetSymbol)));
|
||||
}
|
||||
|
||||
Internals::Internals(mojo::ServiceProviderPtr platform_service_provider,
|
||||
Internals::Internals(ServicesDataPtr services,
|
||||
mojo::asset_bundle::AssetBundlePtr root_bundle)
|
||||
: root_bundle_(root_bundle.Pass()),
|
||||
service_provider_impl_(GetProxy(&service_provider_)),
|
||||
|
||||
platform_service_provider_(platform_service_provider.Pass()) {
|
||||
service_provider_impl_.set_fallback_service_provider(
|
||||
platform_service_provider_.get());
|
||||
: services_(services.Pass()),
|
||||
root_bundle_(root_bundle.Pass()),
|
||||
service_provider_impl_(GetProxy(&service_provider_)) {
|
||||
if (services_ && services_->services_provided_by_embedder) {
|
||||
service_provider_impl_.set_fallback_service_provider(
|
||||
services_->services_provided_by_embedder.get());
|
||||
}
|
||||
service_provider_impl_.AddService<mojo::asset_bundle::AssetUnpacker>(this);
|
||||
|
||||
// Currently we don't consume any services provided by the application.
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#include "mojo/public/cpp/application/service_provider_impl.h"
|
||||
#include "mojo/public/interfaces/application/service_provider.mojom.h"
|
||||
#include "mojo/services/asset_bundle/interfaces/asset_bundle.mojom.h"
|
||||
#include "sky/services/engine/sky_engine.mojom.h"
|
||||
|
||||
namespace mojo {
|
||||
class ApplicationConnection;
|
||||
@ -26,7 +27,7 @@ class Internals
|
||||
~Internals() override;
|
||||
|
||||
static void Create(Dart_Isolate isolate,
|
||||
mojo::ServiceProviderPtr platform_service_provider,
|
||||
ServicesDataPtr services,
|
||||
mojo::asset_bundle::AssetBundlePtr root_bundle);
|
||||
|
||||
mojo::Handle TakeServicesProvidedByEmbedder();
|
||||
@ -34,7 +35,7 @@ class Internals
|
||||
mojo::Handle TakeServicesProvidedToEmbedder();
|
||||
|
||||
private:
|
||||
explicit Internals(mojo::ServiceProviderPtr platform_service_provider,
|
||||
explicit Internals(ServicesDataPtr services,
|
||||
mojo::asset_bundle::AssetBundlePtr root_bundle);
|
||||
|
||||
// |mojo::InterfaceFactory<mojo::asset_bundle::AssetUnpacker>| implementation:
|
||||
@ -42,10 +43,11 @@ class Internals
|
||||
mojo::ApplicationConnection* connection,
|
||||
mojo::InterfaceRequest<mojo::asset_bundle::AssetUnpacker>) override;
|
||||
|
||||
ServicesDataPtr services_;
|
||||
mojo::asset_bundle::AssetBundlePtr root_bundle_;
|
||||
|
||||
mojo::ServiceProviderPtr service_provider_;
|
||||
mojo::ServiceProviderImpl service_provider_impl_;
|
||||
mojo::ServiceProviderPtr platform_service_provider_;
|
||||
|
||||
// A ServiceProvider supplied by the application that exposes services to
|
||||
// the embedder.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user