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

Unified Diff: sky/viewer/services/inspector_impl.cc

Issue 710043004: Make it possible to have multiple InspectorBackends (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Split out ServerImpl, somehow breaks JS connections... Created 6 years, 1 month 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
« sky/services/inspector/server.cc ('K') | « sky/viewer/services/inspector_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/services/inspector_impl.cc
diff --git a/sky/viewer/services/inspector_impl.cc b/sky/viewer/services/inspector_impl.cc
index a5343fa9600723ac64b2513f202966330e1700ab..7ff9fa9ea3c2486ff49cce63041870fac7e5cb3a 100644
--- a/sky/viewer/services/inspector_impl.cc
+++ b/sky/viewer/services/inspector_impl.cc
@@ -4,6 +4,7 @@
#include "sky/viewer/services/inspector_impl.h"
+#include "base/bind.h"
#include "sky/engine/public/web/WebDocument.h"
#include "sky/engine/public/web/WebElement.h"
#include "sky/engine/public/web/WebFrame.h"
@@ -19,9 +20,19 @@ InspectorServiceImpl::InspectorServiceImpl(DocumentView* view)
InspectorServiceImpl::~InspectorServiceImpl() {
}
+void Ignored() {}
Aaron Boodman 2014/11/11 16:12:50 We should put a templated version of this in bindi
+
void InspectorServiceImpl::Inject() {
if (!view_)
return;
+
+ mojo::ServiceProviderPtr inpector_service_provider;
+ view_->shell()->ConnectToApplication("mojo:sky_inspector_server",
+ GetProxy(&inpector_service_provider));
+ InspectorServerPtr inspector;
+ ConnectToService(inpector_service_provider.get(), &inspector);
+ inspector->Listen(9898, base::Bind(&Ignored));
+ inspector.WaitForIncomingMethodCall();
view_->web_view()->injectModule("/sky/framework/inspector/inspector.sky");
}
« sky/services/inspector/server.cc ('K') | « sky/viewer/services/inspector_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698