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

Side by Side Diff: sky/viewer/internals.cc

Issue 1118843003: Remove some InterfacePtr<> methods which directly deal with message pipe handles. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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/document_view.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/engine/config.h" 5 #include "sky/engine/config.h"
6 #include "sky/viewer/internals.h" 6 #include "sky/viewer/internals.h"
7 7
8 #include "mojo/public/cpp/application/connect.h" 8 #include "mojo/public/cpp/application/connect.h"
9 #include "mojo/public/cpp/bindings/array.h" 9 #include "mojo/public/cpp/bindings/array.h"
10 #include "sky/engine/public/web/WebDocument.h" 10 #include "sky/engine/public/web/WebDocument.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 return document_view_->TakeServiceRegistry().release(); 165 return document_view_->TakeServiceRegistry().release();
166 } 166 }
167 167
168 // Returns a MessagePipe handle that's connected to this Shell. The caller 168 // Returns a MessagePipe handle that's connected to this Shell. The caller
169 // owns the handle and is expected to use it to create the JS Application for 169 // owns the handle and is expected to use it to create the JS Application for
170 // the DocumentView. 170 // the DocumentView.
171 mojo::Handle Internals::TakeShellProxyHandle() { 171 mojo::Handle Internals::TakeShellProxyHandle() {
172 mojo::ShellPtr shell; 172 mojo::ShellPtr shell;
173 if (!shell_binding_.is_bound()) 173 if (!shell_binding_.is_bound())
174 shell_binding_.Bind(GetProxy(&shell)); 174 shell_binding_.Bind(GetProxy(&shell));
175 return shell.PassMessagePipe().release(); 175 return shell.PassInterface().PassHandle().release();
176 } 176 }
177 177
178 void Internals::ConnectToApplication( 178 void Internals::ConnectToApplication(
179 const mojo::String& application_url, 179 const mojo::String& application_url,
180 mojo::InterfaceRequest<mojo::ServiceProvider> services, 180 mojo::InterfaceRequest<mojo::ServiceProvider> services,
181 mojo::ServiceProviderPtr exposed_services) { 181 mojo::ServiceProviderPtr exposed_services) {
182 if (document_view_) { 182 if (document_view_) {
183 document_view_->shell()->ConnectToApplication( 183 document_view_->shell()->ConnectToApplication(
184 application_url, services.Pass(), exposed_services.Pass()); 184 application_url, services.Pass(), exposed_services.Pass());
185 } 185 }
186 } 186 }
187 187
188 } // namespace sky 188 } // namespace sky
OLDNEW
« no previous file with comments | « sky/viewer/document_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698