| 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_TO_APPLICATION_PARAMS_H_ | 5 #ifndef MOJO_SHELL_CONNECT_TO_APPLICATION_PARAMS_H_ |
| 6 #define MOJO_SHELL_CONNECT_TO_APPLICATION_PARAMS_H_ | 6 #define MOJO_SHELL_CONNECT_TO_APPLICATION_PARAMS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 return std::move(exposed_services_); | 64 return std::move(exposed_services_); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void set_on_application_end(const base::Closure& value) { | 67 void set_on_application_end(const base::Closure& value) { |
| 68 on_application_end_ = value; | 68 on_application_end_ = value; |
| 69 } | 69 } |
| 70 const base::Closure& on_application_end() const { | 70 const base::Closure& on_application_end() const { |
| 71 return on_application_end_; | 71 return on_application_end_; |
| 72 } | 72 } |
| 73 | 73 |
| 74 void set_connect_callback(const Shell::ConnectToApplicationCallback& value) { | 74 void set_connect_callback( |
| 75 const shell::mojom::Shell::ConnectToApplicationCallback& value) { |
| 75 connect_callback_ = value; | 76 connect_callback_ = value; |
| 76 } | 77 } |
| 77 const Shell::ConnectToApplicationCallback& connect_callback() const { | 78 const shell::mojom::Shell::ConnectToApplicationCallback& |
| 79 connect_callback() const { |
| 78 return connect_callback_; | 80 return connect_callback_; |
| 79 } | 81 } |
| 80 | 82 |
| 81 private: | 83 private: |
| 82 // It may be null (i.e., is_null() returns true) which indicates that there is | 84 // It may be null (i.e., is_null() returns true) which indicates that there is |
| 83 // no source (e.g., for the first application or in tests). | 85 // no source (e.g., for the first application or in tests). |
| 84 Identity source_; | 86 Identity source_; |
| 85 // The identity of the application being connected to. | 87 // The identity of the application being connected to. |
| 86 Identity target_; | 88 Identity target_; |
| 87 // The URL request to fetch the application. It may contain more information | 89 // The URL request to fetch the application. It may contain more information |
| 88 // than |target_| (e.g., headers, request body). When it is taken, |target_| | 90 // than |target_| (e.g., headers, request body). When it is taken, |target_| |
| 89 // remains unchanged. | 91 // remains unchanged. |
| 90 URLRequestPtr target_url_request_; | 92 URLRequestPtr target_url_request_; |
| 91 | 93 |
| 92 InterfaceRequest<ServiceProvider> services_; | 94 InterfaceRequest<ServiceProvider> services_; |
| 93 ServiceProviderPtr exposed_services_; | 95 ServiceProviderPtr exposed_services_; |
| 94 base::Closure on_application_end_; | 96 base::Closure on_application_end_; |
| 95 Shell::ConnectToApplicationCallback connect_callback_; | 97 shell::mojom::Shell::ConnectToApplicationCallback connect_callback_; |
| 96 | 98 |
| 97 DISALLOW_COPY_AND_ASSIGN(ConnectToApplicationParams); | 99 DISALLOW_COPY_AND_ASSIGN(ConnectToApplicationParams); |
| 98 }; | 100 }; |
| 99 | 101 |
| 100 } // namespace shell | 102 } // namespace shell |
| 101 } // namespace mojo | 103 } // namespace mojo |
| 102 | 104 |
| 103 #endif // MOJO_SHELL_CONNECT_TO_APPLICATION_PARAMS_H_ | 105 #endif // MOJO_SHELL_CONNECT_TO_APPLICATION_PARAMS_H_ |
| OLD | NEW |