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

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

Issue 294833002: Mojo: more idiomatic C++ bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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
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 "mojo/public/cpp/application/application.h" 5 #include "mojo/public/cpp/application/application.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 8
9 Application::Application() {} 9 Application::Application() {}
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 service_provider_.Bind(service_provider_handle.Pass()); 51 service_provider_.Bind(service_provider_handle.Pass());
52 service_provider_.set_client(this); 52 service_provider_.set_client(this);
53 } 53 }
54 54
55 void Application::ConnectToService(const mojo::String& url, 55 void Application::ConnectToService(const mojo::String& url,
56 ScopedMessagePipeHandle client_handle) { 56 ScopedMessagePipeHandle client_handle) {
57 // TODO(davemoore): This method must be overridden by an Application subclass 57 // TODO(davemoore): This method must be overridden by an Application subclass
58 // to dispatch to the right ServiceConnector. We need to figure out an 58 // to dispatch to the right ServiceConnector. We need to figure out an
59 // approach to registration to make this better. 59 // approach to registration to make this better.
60 assert(1 == service_connectors_.size()); 60 assert(1 == service_connectors_.size());
61 return service_connectors_.front()->ConnectToService(url.To<std::string>(), 61 return service_connectors_.front()->ConnectToService(url,
62 client_handle.Pass()); 62 client_handle.Pass());
63 } 63 }
64 64
65 } // namespace mojo 65 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/application/connect.h ('k') | mojo/public/cpp/application/lib/service_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698