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

Unified Diff: sky/viewer/document_view.cc

Issue 858103002: Remove [Client=] annotation from ServiceProvider (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase for trybots (no code changes from ps2) 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/viewer/document_view.h ('k') | sky/viewer/internals.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/document_view.cc
diff --git a/sky/viewer/document_view.cc b/sky/viewer/document_view.cc
index 71e672694b745daca4653d3e33da4ffb216adb9d..cf48567326bc26586232d47481fbbeba49e07d77 100644
--- a/sky/viewer/document_view.cc
+++ b/sky/viewer/document_view.cc
@@ -81,6 +81,7 @@ DocumentView::DocumentView(
mojo::URLResponsePtr response,
mojo::Shell* shell)
: response_(response.Pass()),
+ exported_services_(services.Pass()),
shell_(shell),
web_view_(nullptr),
root_(nullptr),
@@ -89,9 +90,8 @@ DocumentView::DocumentView(
bitmap_rasterizer_(nullptr),
debugger_id_(s_next_debugger_id++),
weak_factory_(this) {
- // TODO(jamesr): Is this right?
exported_services_.AddService(&view_manager_client_factory_);
- mojo::WeakBindToPipe(&exported_services_, services.PassMessagePipe());
+ inspector_service_provider_impl_.AddService(&inspector_service_factory_);
}
DocumentView::~DocumentView() {
@@ -107,12 +107,14 @@ base::WeakPtr<DocumentView> DocumentView::GetWeakPtr() {
void DocumentView::OnEmbed(
mojo::View* root,
- mojo::ServiceProviderImpl* exported_services,
- scoped_ptr<mojo::ServiceProvider> imported_services) {
+ mojo::InterfaceRequest<mojo::ServiceProvider> services,
+ mojo::ServiceProviderPtr exposed_services) {
root_ = root;
- imported_services_ = imported_services.Pass();
+ imported_services_ = exposed_services.Pass();
navigator_host_.set_service_provider(imported_services_.get());
- exported_services->AddService(&inspector_service_factory_);
+
+ if (services.is_pending())
+ inspector_service_provider_impl_.Bind(services.Pass());
Load(response_.Pass());
« no previous file with comments | « sky/viewer/document_view.h ('k') | sky/viewer/internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698