OLD | NEW |
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 Loading... |
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 |
OLD | NEW |