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

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

Issue 931873002: Delete sky/services/inspector/server.cc. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Drop the InspectorServer interface and inspector_impl. 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 unified diff | Download patch
« no previous file with comments | « sky/viewer/services/inspector_impl.h ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "sky/viewer/services/inspector_impl.h"
6
7 #include "base/bind.h"
8 #include "sky/engine/public/web/WebDocument.h"
9 #include "sky/engine/public/web/WebElement.h"
10 #include "sky/engine/public/web/WebFrame.h"
11 #include "sky/engine/public/web/WebView.h"
12 #include "sky/services/inspector/inspector.mojom.h"
13 #include "sky/viewer/document_view.h"
14
15 namespace sky {
16
17 InspectorServiceImpl::InspectorServiceImpl(DocumentView* view)
18 : view_(view->GetWeakPtr()) {
19 }
20
21 InspectorServiceImpl::~InspectorServiceImpl() {
22 }
23
24 void Ignored() {}
25
26 void InspectorServiceImpl::Inject() {
27 if (!view_)
28 return;
29
30 mojo::ServiceProviderPtr inspector_service_provider;
31 view_->shell()->ConnectToApplication("mojo:sky_inspector_server",
32 GetProxy(&inspector_service_provider),
33 nullptr);
34 InspectorServerPtr inspector;
35 mojo::ConnectToService(inspector_service_provider.get(), &inspector);
36 inspector->Listen(9898, base::Bind(&Ignored));
37 // Listen drops existing agents/backends, wait before registering new ones.
38 inspector.WaitForIncomingMethodCall();
39
40 view_->web_view()->injectModule("/sky/framework/inspector/inspector.sky");
41 view_->StartDebuggerInspectorBackend();
42 }
43
44 } // namespace sky
OLDNEW
« no previous file with comments | « sky/viewer/services/inspector_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698