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

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: 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/compositor/surface_holder.cc ('k') | sky/viewer/content_handler_impl.cc » ('j') | 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/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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 InspectorBackendMojoImpl::~InspectorBackendMojoImpl() { 104 InspectorBackendMojoImpl::~InspectorBackendMojoImpl() {
105 } 105 }
106 106
107 void InspectorBackendMojoImpl::Connect() { 107 void InspectorBackendMojoImpl::Connect() {
108 mojo::Shell* shell = host_->GetShell(); 108 mojo::Shell* shell = host_->GetShell();
109 mojo::InterfaceRequest<mojo::ServiceProvider> service_provider_request; 109 mojo::InterfaceRequest<mojo::ServiceProvider> service_provider_request;
110 mojo::MessagePipe pipe; 110 mojo::MessagePipe pipe;
111 service_provider_request.Bind(pipe.handle0.Pass()); 111 service_provider_request.Bind(pipe.handle0.Pass());
112 inspector_service_provider_.BindToHandle(pipe.handle1.Pass()); 112 inspector_service_provider_.BindToHandle(pipe.handle1.Pass());
113 shell->ConnectToApplication("mojo:sky_inspector_server", 113 shell->ConnectToApplication("mojo:sky_inspector_server",
114 service_provider_request.Pass()); 114 service_provider_request.Pass(), nullptr);
115 mojo::ConnectToService(&inspector_service_provider_, &frontend_); 115 mojo::ConnectToService(&inspector_service_provider_, &frontend_);
116 116
117 // Theoretically we should load our state from the inspector cookie. 117 // Theoretically we should load our state from the inspector cookie.
118 inspector_state_ = 118 inspector_state_ =
119 adoptPtr(new InspectorState(nullptr, JSONObject::create())); 119 adoptPtr(new InspectorState(nullptr, JSONObject::create()));
120 old_frontend_ = adoptPtr(new InspectorFrontend(this)); 120 old_frontend_ = adoptPtr(new InspectorFrontend(this));
121 121
122 PageScriptDebugServer::setMainThreadIsolate(host_->GetIsolate()); 122 PageScriptDebugServer::setMainThreadIsolate(host_->GetIsolate());
123 OwnPtr<MessageLoopAdaptor> message_loop = adoptPtr(new MessageLoopAdaptor); 123 OwnPtr<MessageLoopAdaptor> message_loop = adoptPtr(new MessageLoopAdaptor);
124 PageScriptDebugServer::shared().setClientMessageLoop(message_loop.release()); 124 PageScriptDebugServer::shared().setClientMessageLoop(message_loop.release());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
177 177
178 InspectorBackendMojo::~InspectorBackendMojo() { 178 InspectorBackendMojo::~InspectorBackendMojo() {
179 } 179 }
180 180
181 void InspectorBackendMojo::Connect() { 181 void InspectorBackendMojo::Connect() {
182 impl_->Connect(); 182 impl_->Connect();
183 } 183 }
184 184
185 } // namespace inspector 185 } // namespace inspector
OLDNEW
« no previous file with comments | « sky/compositor/surface_holder.cc ('k') | sky/viewer/content_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698