| 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/shell.mojom.h" | 10 #include "mojo/shell/public/interfaces/shell.mojom.h" |
| 11 #include "mojo/shell/public/interfaces/shell_client.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 ShellClientRequest = InterfaceRequest<shell::mojom::ShellClient>; | 17 using ShellClientRequest = InterfaceRequest<shell::mojom::ShellClient>; |
| 18 | 18 |
| 19 // An interface that encapsulates the Mojo Shell's broker interface by which |
| 20 // connections between applications are established. Implemented by |
| 21 // ShellConnection, this is the primary interface exposed to clients. |
| 19 class Shell { | 22 class Shell { |
| 20 public: | 23 public: |
| 21 class ConnectParams { | 24 class ConnectParams { |
| 22 public: | 25 public: |
| 23 explicit ConnectParams(const std::string& url); | 26 explicit ConnectParams(const std::string& url); |
| 24 explicit ConnectParams(URLRequestPtr request); | 27 explicit ConnectParams(URLRequestPtr request); |
| 25 ~ConnectParams(); | 28 ~ConnectParams(); |
| 26 | 29 |
| 27 URLRequestPtr TakeRequest() { return std::move(request_); } | 30 URLRequestPtr TakeRequest() { return std::move(request_); } |
| 28 shell::mojom::CapabilityFilterPtr TakeFilter() { | 31 shell::mojom::CapabilityFilterPtr TakeFilter() { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 69 |
| 67 // Create an object that can be used to refcount the lifetime of the | 70 // Create an object that can be used to refcount the lifetime of the |
| 68 // application. The returned object may be cloned, and when the refcount falls | 71 // application. The returned object may be cloned, and when the refcount falls |
| 69 // to zero Quit() is called. | 72 // to zero Quit() is called. |
| 70 virtual scoped_ptr<AppRefCount> CreateAppRefCount() = 0; | 73 virtual scoped_ptr<AppRefCount> CreateAppRefCount() = 0; |
| 71 }; | 74 }; |
| 72 | 75 |
| 73 } // namespace mojo | 76 } // namespace mojo |
| 74 | 77 |
| 75 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_H_ | 78 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_H_ |
| OLD | NEW |