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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 // Shell: | 85 // Shell: |
86 scoped_ptr<Connection> Connect(const std::string& url) override; | 86 scoped_ptr<Connection> Connect(const std::string& url) override; |
87 scoped_ptr<Connection> Connect(ConnectParams* params) override; | 87 scoped_ptr<Connection> Connect(ConnectParams* params) override; |
88 void Quit() override; | 88 void Quit() override; |
89 scoped_ptr<AppRefCount> CreateAppRefCount() override; | 89 scoped_ptr<AppRefCount> CreateAppRefCount() override; |
90 | 90 |
91 // shell::mojom::ShellClient: | 91 // shell::mojom::ShellClient: |
92 void Initialize(shell::mojom::ShellPtr shell, | 92 void Initialize(shell::mojom::ShellPtr shell, |
93 const mojo::String& url, | 93 const mojo::String& url, |
94 uint32_t id) override; | 94 uint32_t id, |
| 95 uint32_t user_id) override; |
95 void AcceptConnection( | 96 void AcceptConnection( |
96 const String& requestor_url, | 97 const String& requestor_url, |
97 uint32_t requestor_id, | 98 uint32_t requestor_id, |
| 99 uint32_t requestor_user_id, |
98 shell::mojom::InterfaceProviderRequest remote_interfaces, | 100 shell::mojom::InterfaceProviderRequest remote_interfaces, |
99 shell::mojom::InterfaceProviderPtr local_interfaces, | 101 shell::mojom::InterfaceProviderPtr local_interfaces, |
100 Array<String> allowed_interfaces, | 102 Array<String> allowed_interfaces, |
101 const String& url) override; | 103 const String& url) override; |
102 void OnQuitRequested(const Callback<void(bool)>& callback) override; | 104 void OnQuitRequested(const Callback<void(bool)>& callback) override; |
103 | 105 |
104 void OnConnectionError(); | 106 void OnConnectionError(); |
105 | 107 |
106 // Called from Quit() when there is no Shell connection, or asynchronously | 108 // Called from Quit() when there is no Shell connection, or asynchronously |
107 // from Quit() once the Shell has OK'ed shutdown. | 109 // from Quit() once the Shell has OK'ed shutdown. |
(...skipping 19 matching lines...) Expand all Loading... |
127 bool quit_requested_; | 129 bool quit_requested_; |
128 int ref_count_; | 130 int ref_count_; |
129 base::WeakPtrFactory<ShellConnection> weak_factory_; | 131 base::WeakPtrFactory<ShellConnection> weak_factory_; |
130 | 132 |
131 MOJO_DISALLOW_COPY_AND_ASSIGN(ShellConnection); | 133 MOJO_DISALLOW_COPY_AND_ASSIGN(ShellConnection); |
132 }; | 134 }; |
133 | 135 |
134 } // namespace mojo | 136 } // namespace mojo |
135 | 137 |
136 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_CONNECTION_H_ | 138 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_CONNECTION_H_ |
OLD | NEW |