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

Side by Side Diff: mojo/public/cpp/application/lib/weak_service_provider.cc

Issue 433513005: Pass ServiceProvider thru ViewManagerService::Embed() allowing embedder & embeddee to expose servic… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | Annotate | Revision Log
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 "mojo/public/cpp/application/lib/weak_service_provider.h"
6 #include "mojo/public/interfaces/application/service_provider.mojom.h"
7
8 namespace mojo {
9 namespace internal {
10
11 WeakServiceProvider::WeakServiceProvider(ServiceProvider* service_provider)
12 : service_provider_(service_provider) {}
13
14 WeakServiceProvider::~WeakServiceProvider() {}
15
16 void WeakServiceProvider::Clear() {
17 service_provider_ = NULL;
18 }
19
20 void WeakServiceProvider::ConnectToService(
21 const String& service_name,
22 ScopedMessagePipeHandle client_handle) {
23 if (service_provider_)
24 service_provider_->ConnectToService(service_name, client_handle.Pass());
25 }
26
27 } // namespace internal
28 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/application/lib/weak_service_provider.h ('k') | mojo/public/cpp/application/service_provider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698