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 #ifndef MOJO_PUBLIC_APPLICATION_APPLICATION_IMPL_H_ | 5 #ifndef MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_IMPL_H_ |
6 #define MOJO_PUBLIC_APPLICATION_APPLICATION_IMPL_H_ | 6 #define MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "mojo/public/cpp/application/application_delegate.h" | 12 #include "mojo/public/cpp/application/application_delegate.h" |
13 #include "mojo/public/cpp/application/lib/service_registry.h" | 13 #include "mojo/public/cpp/application/lib/service_registry.h" |
14 #include "mojo/public/cpp/system/core.h" | 14 #include "mojo/public/cpp/system/core.h" |
15 #include "mojo/public/interfaces/application/application.mojom.h" | 15 #include "mojo/public/interfaces/application/application.mojom.h" |
16 #include "mojo/public/interfaces/application/application_connector.mojom.h" | 16 #include "mojo/public/interfaces/application/application_connector.mojom.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // received), if it is not already. | 84 // received), if it is not already. |
85 void WaitForInitialize(); | 85 void WaitForInitialize(); |
86 | 86 |
87 // Unbinds the Shell and Application connections. Can be used to re-bind the | 87 // Unbinds the Shell and Application connections. Can be used to re-bind the |
88 // handles to another implementation of ApplicationImpl, for instance when | 88 // handles to another implementation of ApplicationImpl, for instance when |
89 // running apptests. | 89 // running apptests. |
90 void UnbindConnections(InterfaceRequest<Application>* application_request, | 90 void UnbindConnections(InterfaceRequest<Application>* application_request, |
91 ShellPtr* shell); | 91 ShellPtr* shell); |
92 | 92 |
93 // |Application| implementation. | 93 // |Application| implementation. |
94 void Initialize(ShellPtr shell, | 94 void Initialize(InterfaceHandle<Shell> shell, |
95 Array<String> args, | 95 Array<String> args, |
96 const mojo::String& url) override; | 96 const mojo::String& url) override; |
97 void AcceptConnection(const String& requestor_url, | 97 void AcceptConnection(const String& requestor_url, |
98 InterfaceRequest<ServiceProvider> services, | 98 InterfaceRequest<ServiceProvider> services, |
99 ServiceProviderPtr exposed_services, | 99 InterfaceHandle<ServiceProvider> exposed_services, |
100 const String& url) override; | 100 const String& url) override; |
101 void RequestQuit() override; | 101 void RequestQuit() override; |
102 | 102 |
103 private: | 103 private: |
104 using ServiceRegistryList = | 104 using ServiceRegistryList = |
105 std::vector<std::unique_ptr<internal::ServiceRegistry>>; | 105 std::vector<std::unique_ptr<internal::ServiceRegistry>>; |
106 ServiceRegistryList incoming_service_registries_; | 106 ServiceRegistryList incoming_service_registries_; |
107 ServiceRegistryList outgoing_service_registries_; | 107 ServiceRegistryList outgoing_service_registries_; |
108 ApplicationDelegate* delegate_; | 108 ApplicationDelegate* delegate_; |
109 Binding<Application> binding_; | 109 Binding<Application> binding_; |
110 ShellPtr shell_; | 110 ShellPtr shell_; |
111 std::string url_; | 111 std::string url_; |
112 std::vector<std::string> args_; | 112 std::vector<std::string> args_; |
113 | 113 |
114 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationImpl); | 114 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationImpl); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace mojo | 117 } // namespace mojo |
118 | 118 |
119 #endif // MOJO_PUBLIC_APPLICATION_APPLICATION_IMPL_H_ | 119 #endif // MOJO_PUBLIC_CPP_APPLICATION_APPLICATION_IMPL_H_ |
OLD | NEW |