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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // Shell: | 82 // Shell: |
83 scoped_ptr<Connection> Connect(const std::string& url) override; | 83 scoped_ptr<Connection> Connect(const std::string& url) override; |
84 scoped_ptr<Connection> Connect(ConnectParams* params) override; | 84 scoped_ptr<Connection> Connect(ConnectParams* params) override; |
85 void Quit() override; | 85 void Quit() override; |
86 scoped_ptr<AppRefCount> CreateAppRefCount() override; | 86 scoped_ptr<AppRefCount> CreateAppRefCount() override; |
87 | 87 |
88 // shell::mojom::ShellClient: | 88 // shell::mojom::ShellClient: |
89 void Initialize(shell::mojom::ShellPtr shell, | 89 void Initialize(shell::mojom::ShellPtr shell, |
90 const mojo::String& url, | 90 const mojo::String& url, |
91 uint32_t id) override; | 91 uint32_t id) override; |
92 void AcceptConnection(const String& requestor_url, | 92 void AcceptConnection( |
93 uint32_t requestor_id, | 93 const String& requestor_url, |
94 InterfaceRequest<InterfaceProvider> remote_interfaces, | 94 uint32_t requestor_id, |
95 InterfaceProviderPtr local_interfaces, | 95 shell::mojom::InterfaceProviderRequest remote_interfaces, |
96 Array<String> allowed_interfaces, | 96 shell::mojom::InterfaceProviderPtr local_interfaces, |
97 const String& url) override; | 97 Array<String> allowed_interfaces, |
| 98 const String& url) override; |
98 void OnQuitRequested(const Callback<void(bool)>& callback) override; | 99 void OnQuitRequested(const Callback<void(bool)>& callback) override; |
99 | 100 |
100 void OnConnectionError(); | 101 void OnConnectionError(); |
101 | 102 |
102 // Called from Quit() when there is no Shell connection, or asynchronously | 103 // Called from Quit() when there is no Shell connection, or asynchronously |
103 // from Quit() once the Shell has OK'ed shutdown. | 104 // from Quit() once the Shell has OK'ed shutdown. |
104 void QuitNow(); | 105 void QuitNow(); |
105 | 106 |
106 // Unbinds the Shell and Application connections. Can be used to re-bind the | 107 // Unbinds the Shell and Application connections. Can be used to re-bind the |
107 // handles to another implementation of ShellConnection, for instance when | 108 // handles to another implementation of ShellConnection, for instance when |
(...skipping 11 matching lines...) Expand all Loading... |
119 AppLifetimeHelper app_lifetime_helper_; | 120 AppLifetimeHelper app_lifetime_helper_; |
120 bool quit_requested_; | 121 bool quit_requested_; |
121 base::WeakPtrFactory<ShellConnection> weak_factory_; | 122 base::WeakPtrFactory<ShellConnection> weak_factory_; |
122 | 123 |
123 MOJO_DISALLOW_COPY_AND_ASSIGN(ShellConnection); | 124 MOJO_DISALLOW_COPY_AND_ASSIGN(ShellConnection); |
124 }; | 125 }; |
125 | 126 |
126 } // namespace mojo | 127 } // namespace mojo |
127 | 128 |
128 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_CONNECTION_H_ | 129 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_CONNECTION_H_ |
OLD | NEW |