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

Unified Diff: sky/shell/ui/engine.cc

Issue 962043002: Expose Android sensors to via Mojo services (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Review comments Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/shell/ui/engine.h ('k') | sky/shell/ui/internals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/ui/engine.cc
diff --git a/sky/shell/ui/engine.cc b/sky/shell/ui/engine.cc
index 5cc3632ac65b71ded5b43154c9648920a822d20d..705fc224b89228af99f811a7583a594c21546a4a 100644
--- a/sky/shell/ui/engine.cc
+++ b/sky/shell/ui/engine.cc
@@ -14,6 +14,7 @@
#include "sky/services/platform/platform_impl.h"
#include "sky/shell/ui/animator.h"
#include "sky/shell/ui/input_event_converter.h"
+#include "sky/shell/ui/internals.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
@@ -48,10 +49,10 @@ base::WeakPtr<Engine> Engine::GetWeakPtr() {
}
void Engine::Init(mojo::ScopedMessagePipeHandle service_provider_handle) {
- mojo::ServiceProviderPtr service_provider =
+ service_provider_ =
mojo::MakeProxy<mojo::ServiceProvider>(service_provider_handle.Pass());
mojo::NetworkServicePtr network_service;
- mojo::ConnectToService(service_provider.get(), &network_service);
+ mojo::ConnectToService(service_provider_.get(), &network_service);
platform_impl_.reset(new PlatformImpl(network_service.Pass()));
blink::initialize(platform_impl_.get());
@@ -141,6 +142,11 @@ void Engine::scheduleVisualUpdate() {
animator_->RequestFrame();
}
+void Engine::didCreateIsolate(blink::WebLocalFrame* frame,
+ Dart_Isolate isolate) {
+ Internals::Create(isolate, service_provider_.Pass());
+}
+
blink::ServiceProvider* Engine::services() {
return this;
}
« no previous file with comments | « sky/shell/ui/engine.h ('k') | sky/shell/ui/internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698