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

Side by Side Diff: sky/engine/v8_inspector/inspector_backend_mojo.cc

Issue 845593003: Pass ServiceProvider and ServiceProvider& params in Connect (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 unified diff | Download patch
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/engine/config.h" 5 #include "sky/engine/config.h"
6 #include "sky/engine/v8_inspector/inspector_backend_mojo.h" 6 #include "sky/engine/v8_inspector/inspector_backend_mojo.h"
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "gen/v8_inspector/InspectorBackendDispatcher.h" 10 #include "gen/v8_inspector/InspectorBackendDispatcher.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 : host_(host) { 91 : host_(host) {
92 } 92 }
93 93
94 InspectorBackendMojoImpl::~InspectorBackendMojoImpl() { 94 InspectorBackendMojoImpl::~InspectorBackendMojoImpl() {
95 } 95 }
96 96
97 void InspectorBackendMojoImpl::Connect() { 97 void InspectorBackendMojoImpl::Connect() {
98 mojo::Shell* shell = host_->GetShell(); 98 mojo::Shell* shell = host_->GetShell();
99 mojo::ServiceProviderPtr inspector_service_provider; 99 mojo::ServiceProviderPtr inspector_service_provider;
100 shell->ConnectToApplication("mojo:sky_inspector_server", 100 shell->ConnectToApplication("mojo:sky_inspector_server",
101 GetProxy(&inspector_service_provider)); 101 GetProxy(&inspector_service_provider),
102 mojo::ServiceProviderPtr());
102 mojo::ConnectToService(inspector_service_provider.get(), &frontend_); 103 mojo::ConnectToService(inspector_service_provider.get(), &frontend_);
103 frontend_.set_client(this); 104 frontend_.set_client(this);
104 105
105 // Theoretically we should load our state from the inspector cookie. 106 // Theoretically we should load our state from the inspector cookie.
106 inspector_state_ = 107 inspector_state_ =
107 adoptPtr(new InspectorState(nullptr, JSONObject::create())); 108 adoptPtr(new InspectorState(nullptr, JSONObject::create()));
108 old_frontend_ = adoptPtr(new InspectorFrontend(this)); 109 old_frontend_ = adoptPtr(new InspectorFrontend(this));
109 110
110 PageScriptDebugServer::setMainThreadIsolate(host_->GetIsolate()); 111 PageScriptDebugServer::setMainThreadIsolate(host_->GetIsolate());
111 OwnPtr<MessageLoopAdaptor> message_loop = adoptPtr(new MessageLoopAdaptor); 112 OwnPtr<MessageLoopAdaptor> message_loop = adoptPtr(new MessageLoopAdaptor);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 159 }
159 160
160 InspectorBackendMojo::~InspectorBackendMojo() { 161 InspectorBackendMojo::~InspectorBackendMojo() {
161 } 162 }
162 163
163 void InspectorBackendMojo::Connect() { 164 void InspectorBackendMojo::Connect() {
164 impl_->Connect(); 165 impl_->Connect();
165 } 166 }
166 167
167 } // namespace inspector 168 } // namespace inspector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698