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

Unified Diff: sky/viewer/internals.cc

Issue 958673002: Added ServiceRegistry interface (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/viewer/internals.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/internals.cc
diff --git a/sky/viewer/internals.cc b/sky/viewer/internals.cc
index 770042ff024ef378ab446ba9333ed6678cd5ee81..5a93590bc2fffdd7deeaa4e1c5f1258b39524396 100644
--- a/sky/viewer/internals.cc
+++ b/sky/viewer/internals.cc
@@ -59,6 +59,11 @@ void TakeServicesProvidedToEmbedder(Dart_NativeArguments args) {
args, GetInternals()->TakeServicesProvidedToEmbedder().value());
}
+void TakeServiceRegistry(Dart_NativeArguments args) {
+ Dart_SetIntegerReturnValue(
+ args, GetInternals()->TakeServiceRegistry().value());
+}
+
const DartBuiltin::Natives kNativeFunctions[] = {
{"contentAsText", ContentAsText, 0},
{"notifyTestComplete", NotifyTestComplete, 1},
@@ -66,6 +71,7 @@ const DartBuiltin::Natives kNativeFunctions[] = {
{"takeShellProxyHandle", TakeShellProxyHandle, 0},
{"takeServicesProvidedByEmbedder", TakeServicesProvidedByEmbedder, 0},
{"takeServicesProvidedToEmbedder", TakeServicesProvidedToEmbedder, 0},
+ {"takeServiceRegistry", TakeServiceRegistry, 0},
};
const DartBuiltin& GetBuiltin() {
@@ -92,6 +98,7 @@ String renderTreeAsText() native "renderTreeAsText";
int takeShellProxyHandle() native "takeShellProxyHandle";
int takeServicesProvidedByEmbedder() native "takeServicesProvidedByEmbedder";
int takeServicesProvidedToEmbedder() native "takeServicesProvidedToEmbedder";
+int takeServiceRegistry() native "takeServiceRegistry";
)DART";
} // namespace
@@ -152,6 +159,12 @@ mojo::Handle Internals::TakeServicesProvidedByEmbedder() {
return document_view_->TakeServicesProvidedByEmbedder().release();
}
+mojo::Handle Internals::TakeServiceRegistry() {
+ if (!document_view_)
+ return mojo::Handle();
+ return document_view_->TakeServiceRegistry().release();
+}
+
// Returns a MessagePipe handle that's connected to this Shell. The caller
// owns the handle and is expected to use it to create the JS Application for
// the DocumentView.
« no previous file with comments | « sky/viewer/internals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698