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

Unified Diff: mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: snapshot Created 6 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 side-by-side diff with in-line comments
Download patch
Index: mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc b/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
index 5fe22b4cb9583454cb77dc23e3863b2632c26fcf..f1d67e835385d0d14cdee2b775c8918b973ee088 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
@@ -157,12 +157,13 @@ ViewManagerSynchronizer::ViewManagerSynchronizer(ViewManager* view_manager)
connection_id_(0),
next_id_(0),
next_change_id_(0) {
- InterfacePipe<services::view_manager::IViewManager, AnyInterface>
- view_manager_pipe;
+ MessagePipe pipe;
AllocationScope scope;
ViewManagerPrivate(view_manager_).shell()->Connect(
- "mojo:mojo_view_manager", view_manager_pipe.handle_to_peer.Pass());
- service_.reset(view_manager_pipe.handle_to_self.Pass(), this);
+ "mojo:mojo_view_manager", pipe.handle0.Pass());
+ service_ = mojo::MakeProxy<IViewManager>(pipe.handle1.Pass());
+ // XXX how do we hook |this| up as the client without introducing a cycle?
+ // Could use a WeakPtr but that seems complicated :-/
}
ViewManagerSynchronizer::~ViewManagerSynchronizer() {

Powered by Google App Engine
This is Rietveld 408576698