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

Side by Side Diff: mojo/public/cpp/application/application_impl.h

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments Created 4 years, 10 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
« no previous file with comments | « mojo/gpu/gl_context.cc ('k') | mojo/public/cpp/application/connect.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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_
OLDNEW
« no previous file with comments | « mojo/gpu/gl_context.cc ('k') | mojo/public/cpp/application/connect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698