| 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.
|
|
|