OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CONNECT_PARAMS_H_ | 5 #ifndef MOJO_SHELL_CONNECT_PARAMS_H_ |
6 #define MOJO_SHELL_CONNECT_PARAMS_H_ | 6 #define MOJO_SHELL_CONNECT_PARAMS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 class ApplicationInstance; | 22 class ApplicationInstance; |
23 | 23 |
24 // This class represents a request for the application manager to connect to an | 24 // This class represents a request for the application manager to connect to an |
25 // application. | 25 // application. |
26 class ConnectParams { | 26 class ConnectParams { |
27 public: | 27 public: |
28 ConnectParams(); | 28 ConnectParams(); |
29 ~ConnectParams(); | 29 ~ConnectParams(); |
30 | 30 |
31 // Sets |source_|. If |source| is null, |source_| is reset. | |
32 void SetSource(ApplicationInstance* source); | |
33 | |
34 // The following methods set both |target_| and |target_url_request_|. | 31 // The following methods set both |target_| and |target_url_request_|. |
35 void SetTargetURL(const GURL& target_url); | 32 void SetTargetURL(const GURL& target_url); |
36 | 33 |
37 void set_source(const Identity& source) { source_ = source; } | 34 void set_source(const Identity& source) { source_ = source; } |
38 const Identity& source() const { return source_; } | 35 const Identity& source() const { return source_; } |
39 void set_target(const Identity& target) { target_ = target; } | 36 void set_target(const Identity& target) { target_ = target; } |
40 const Identity& target() const { return target_; } | 37 const Identity& target() const { return target_; } |
41 | 38 |
42 void set_remote_interfaces(shell::mojom::InterfaceProviderRequest value) { | 39 void set_remote_interfaces(shell::mojom::InterfaceProviderRequest value) { |
43 remote_interfaces_ = std::move(value); | 40 remote_interfaces_ = std::move(value); |
(...skipping 27 matching lines...) Expand all Loading... |
71 shell::mojom::InterfaceProviderPtr local_interfaces_; | 68 shell::mojom::InterfaceProviderPtr local_interfaces_; |
72 shell::mojom::Shell::ConnectCallback connect_callback_; | 69 shell::mojom::Shell::ConnectCallback connect_callback_; |
73 | 70 |
74 DISALLOW_COPY_AND_ASSIGN(ConnectParams); | 71 DISALLOW_COPY_AND_ASSIGN(ConnectParams); |
75 }; | 72 }; |
76 | 73 |
77 } // namespace shell | 74 } // namespace shell |
78 } // namespace mojo | 75 } // namespace mojo |
79 | 76 |
80 #endif // MOJO_SHELL_CONNECT_PARAMS_H_ | 77 #endif // MOJO_SHELL_CONNECT_PARAMS_H_ |
OLD | NEW |