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

Side by Side Diff: sky/viewer/services/inspector_impl.cc

Issue 845593003: Pass ServiceProvider and ServiceProvider& params in Connect (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: use nullptr instead of ServiceProviderPtr(), fix ShellImpl 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 unified diff | Download patch
« no previous file with comments | « sky/viewer/internals.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/viewer/services/inspector_impl.h" 5 #include "sky/viewer/services/inspector_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "sky/engine/public/web/WebDocument.h" 8 #include "sky/engine/public/web/WebDocument.h"
9 #include "sky/engine/public/web/WebElement.h" 9 #include "sky/engine/public/web/WebElement.h"
10 #include "sky/engine/public/web/WebFrame.h" 10 #include "sky/engine/public/web/WebFrame.h"
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 void Ignored() {} 24 void Ignored() {}
25 25
26 void InspectorServiceImpl::Inject() { 26 void InspectorServiceImpl::Inject() {
27 if (!view_) 27 if (!view_)
28 return; 28 return;
29 29
30 mojo::ServiceProviderPtr inspector_service_provider; 30 mojo::ServiceProviderPtr inspector_service_provider;
31 view_->shell()->ConnectToApplication("mojo:sky_inspector_server", 31 view_->shell()->ConnectToApplication("mojo:sky_inspector_server",
32 GetProxy(&inspector_service_provider)); 32 GetProxy(&inspector_service_provider),
33 nullptr);
33 InspectorServerPtr inspector; 34 InspectorServerPtr inspector;
34 mojo::ConnectToService(inspector_service_provider.get(), &inspector); 35 mojo::ConnectToService(inspector_service_provider.get(), &inspector);
35 inspector->Listen(9898, base::Bind(&Ignored)); 36 inspector->Listen(9898, base::Bind(&Ignored));
36 // Listen drops existing agents/backends, wait before registering new ones. 37 // Listen drops existing agents/backends, wait before registering new ones.
37 inspector.WaitForIncomingMethodCall(); 38 inspector.WaitForIncomingMethodCall();
38 39
39 view_->web_view()->injectModule("/sky/framework/inspector/inspector.sky"); 40 view_->web_view()->injectModule("/sky/framework/inspector/inspector.sky");
40 view_->StartDebuggerInspectorBackend(); 41 view_->StartDebuggerInspectorBackend();
41 } 42 }
42 43
43 } // namespace sky 44 } // namespace sky
OLDNEW
« no previous file with comments | « sky/viewer/internals.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698