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

Unified Diff: sky/viewer/internals.cc

Issue 817573003: Move wm_flow off of views and onto Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 99e8c3bef07240ac249e64f17567318dbfef5497..031622c10114e2cb0564f2c0e376763bf719e1d5 100644
--- a/sky/viewer/internals.cc
+++ b/sky/viewer/internals.cc
@@ -49,6 +49,8 @@ gin::ObjectTemplateBuilder Internals::GetObjectTemplateBuilder(
.SetMethod("contentAsText", &Internals::ContentAsText)
.SetMethod("notifyTestComplete", &Internals::NotifyTestComplete)
.SetMethod("connectToService", &Internals::ConnectToService)
+ .SetMethod("connectToEmbedderService",
+ &Internals::ConnectToEmbedderService)
.SetMethod("pauseAnimations", &Internals::pauseAnimations);
}
@@ -72,6 +74,17 @@ void Internals::NotifyTestComplete(const std::string& test_result) {
mojo::Array<uint8_t>::From(pixels));
}
+mojo::Handle Internals::ConnectToEmbedderService(
+ const std::string& interface_name) {
+ if (!document_view_)
+ return mojo::Handle();
+
+ mojo::MessagePipe pipe;
+ document_view_->imported_services()->ConnectToService(interface_name,
+ pipe.handle1.Pass());
+ return pipe.handle0.release();
+}
+
mojo::Handle Internals::ConnectToService(
const std::string& application_url, const std::string& interface_name) {
if (!document_view_)
« 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