| 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_SHELL_PUBLIC_CPP_SHELL_CONNECTION_H_ | 5 #ifndef MOJO_SHELL_PUBLIC_CPP_SHELL_CONNECTION_H_ |
| 6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_CONNECTION_H_ | 6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_CONNECTION_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 void Quit() override; | 95 void Quit() override; |
| 96 scoped_ptr<AppRefCount> CreateAppRefCount() override; | 96 scoped_ptr<AppRefCount> CreateAppRefCount() override; |
| 97 | 97 |
| 98 private: | 98 private: |
| 99 // shell::mojom::Application implementation. | 99 // shell::mojom::Application implementation. |
| 100 void Initialize(shell::mojom::ShellPtr shell, | 100 void Initialize(shell::mojom::ShellPtr shell, |
| 101 const mojo::String& url, | 101 const mojo::String& url, |
| 102 uint32_t id) override; | 102 uint32_t id) override; |
| 103 void AcceptConnection(const String& requestor_url, | 103 void AcceptConnection(const String& requestor_url, |
| 104 uint32_t requestor_id, | 104 uint32_t requestor_id, |
| 105 InterfaceRequest<ServiceProvider> services, | 105 InterfaceRequest<InterfaceProvider> remote_interfaces, |
| 106 ServiceProviderPtr exposed_services, | 106 InterfaceProviderPtr local_interfaces, |
| 107 Array<String> allowed_interfaces, | 107 Array<String> allowed_interfaces, |
| 108 const String& url) override; | 108 const String& url) override; |
| 109 void OnQuitRequested(const Callback<void(bool)>& callback) override; | 109 void OnQuitRequested(const Callback<void(bool)>& callback) override; |
| 110 | 110 |
| 111 void OnConnectionError(); | 111 void OnConnectionError(); |
| 112 | 112 |
| 113 // Called from Quit() when there is no Shell connection, or asynchronously | 113 // Called from Quit() when there is no Shell connection, or asynchronously |
| 114 // from Quit() once the Shell has OK'ed shutdown. | 114 // from Quit() once the Shell has OK'ed shutdown. |
| 115 void QuitNow(); | 115 void QuitNow(); |
| 116 | 116 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 130 AppLifetimeHelper app_lifetime_helper_; | 130 AppLifetimeHelper app_lifetime_helper_; |
| 131 bool quit_requested_; | 131 bool quit_requested_; |
| 132 base::WeakPtrFactory<ShellConnection> weak_factory_; | 132 base::WeakPtrFactory<ShellConnection> weak_factory_; |
| 133 | 133 |
| 134 MOJO_DISALLOW_COPY_AND_ASSIGN(ShellConnection); | 134 MOJO_DISALLOW_COPY_AND_ASSIGN(ShellConnection); |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 } // namespace mojo | 137 } // namespace mojo |
| 138 | 138 |
| 139 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_CONNECTION_H_ | 139 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_CONNECTION_H_ |
| OLD | NEW |