| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_H_ | 5 #ifndef MOJO_SHELL_PUBLIC_CPP_SHELL_H_ |
| 6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_H_ | 6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_H_ |
| 7 | 7 |
| 8 #include "mojo/shell/public/cpp/app_lifetime_helper.h" | 8 #include "mojo/shell/public/cpp/app_lifetime_helper.h" |
| 9 #include "mojo/shell/public/cpp/connection.h" | 9 #include "mojo/shell/public/cpp/connection.h" |
| 10 #include "mojo/shell/public/interfaces/application.mojom.h" | |
| 11 #include "mojo/shell/public/interfaces/shell.mojom.h" | 10 #include "mojo/shell/public/interfaces/shell.mojom.h" |
| 11 #include "mojo/shell/public/interfaces/shell_client.mojom.h" |
| 12 | 12 |
| 13 namespace mojo { | 13 namespace mojo { |
| 14 | 14 |
| 15 shell::mojom::CapabilityFilterPtr CreatePermissiveCapabilityFilter(); | 15 shell::mojom::CapabilityFilterPtr CreatePermissiveCapabilityFilter(); |
| 16 | 16 |
| 17 using ApplicationRequest = InterfaceRequest<shell::mojom::Application>; | 17 using ShellClientRequest = InterfaceRequest<shell::mojom::ShellClient>; |
| 18 | 18 |
| 19 class Shell { | 19 class Shell { |
| 20 public: | 20 public: |
| 21 class ConnectParams { | 21 class ConnectParams { |
| 22 public: | 22 public: |
| 23 explicit ConnectParams(const std::string& url); | 23 explicit ConnectParams(const std::string& url); |
| 24 explicit ConnectParams(URLRequestPtr request); | 24 explicit ConnectParams(URLRequestPtr request); |
| 25 ~ConnectParams(); | 25 ~ConnectParams(); |
| 26 | 26 |
| 27 URLRequestPtr TakeRequest() { return std::move(request_); } | 27 URLRequestPtr TakeRequest() { return std::move(request_); } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 // Create an object that can be used to refcount the lifetime of the | 68 // Create an object that can be used to refcount the lifetime of the |
| 69 // application. The returned object may be cloned, and when the refcount falls | 69 // application. The returned object may be cloned, and when the refcount falls |
| 70 // to zero Quit() is called. | 70 // to zero Quit() is called. |
| 71 virtual scoped_ptr<AppRefCount> CreateAppRefCount() = 0; | 71 virtual scoped_ptr<AppRefCount> CreateAppRefCount() = 0; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace mojo | 74 } // namespace mojo |
| 75 | 75 |
| 76 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_H_ | 76 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_H_ |
| OLD | NEW |