| 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 COMPONENTS_MUS_CONNECTION_MANAGER_DELEGATE_H_ | 5 #ifndef COMPONENTS_MUS_CONNECTION_MANAGER_DELEGATE_H_ |
| 6 #define COMPONENTS_MUS_CONNECTION_MANAGER_DELEGATE_H_ | 6 #define COMPONENTS_MUS_CONNECTION_MANAGER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "components/mus/public/cpp/types.h" | 10 #include "components/mus/public/cpp/types.h" |
| 11 #include "components/mus/public/interfaces/view_tree.mojom.h" | 11 #include "components/mus/public/interfaces/view_tree.mojom.h" |
| 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" | 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" |
| 13 | 13 |
| 14 namespace mojo { | 14 namespace mus { |
| 15 class ViewTree; | |
| 16 } | |
| 17 | |
| 18 namespace view_manager { | |
| 19 | 15 |
| 20 class ClientConnection; | 16 class ClientConnection; |
| 21 class ConnectionManager; | 17 class ConnectionManager; |
| 22 struct ViewId; | 18 struct ViewId; |
| 19 class ViewTree; |
| 23 | 20 |
| 24 class ConnectionManagerDelegate { | 21 class ConnectionManagerDelegate { |
| 25 public: | 22 public: |
| 26 virtual void OnNoMoreRootConnections() = 0; | 23 virtual void OnNoMoreRootConnections() = 0; |
| 27 | 24 |
| 28 // Creates a ClientConnection in response to Embed() calls on the | 25 // Creates a ClientConnection in response to Embed() calls on the |
| 29 // ConnectionManager. | 26 // ConnectionManager. |
| 30 virtual ClientConnection* CreateClientConnectionForEmbedAtView( | 27 virtual ClientConnection* CreateClientConnectionForEmbedAtView( |
| 31 ConnectionManager* connection_manager, | 28 ConnectionManager* connection_manager, |
| 32 mojo::InterfaceRequest<mojo::ViewTree> tree_request, | 29 mojo::InterfaceRequest<mojo::ViewTree> tree_request, |
| 33 mojo::ConnectionSpecificId creator_id, | 30 ConnectionSpecificId creator_id, |
| 34 mojo::URLRequestPtr request, | 31 mojo::URLRequestPtr request, |
| 35 const ViewId& root_id, | 32 const ViewId& root_id, |
| 36 uint32_t policy_bitmask) = 0; | 33 uint32_t policy_bitmask) = 0; |
| 37 virtual ClientConnection* CreateClientConnectionForEmbedAtView( | 34 virtual ClientConnection* CreateClientConnectionForEmbedAtView( |
| 38 ConnectionManager* connection_manager, | 35 ConnectionManager* connection_manager, |
| 39 mojo::InterfaceRequest<mojo::ViewTree> tree_request, | 36 mojo::InterfaceRequest<mojo::ViewTree> tree_request, |
| 40 mojo::ConnectionSpecificId creator_id, | 37 ConnectionSpecificId creator_id, |
| 41 const ViewId& root_id, | 38 const ViewId& root_id, |
| 42 uint32_t policy_bitmask, | 39 uint32_t policy_bitmask, |
| 43 mojo::ViewTreeClientPtr client) = 0; | 40 mojo::ViewTreeClientPtr client) = 0; |
| 44 | 41 |
| 45 protected: | 42 protected: |
| 46 virtual ~ConnectionManagerDelegate() {} | 43 virtual ~ConnectionManagerDelegate() {} |
| 47 }; | 44 }; |
| 48 | 45 |
| 49 } // namespace view_manager | 46 } // namespace mus |
| 50 | 47 |
| 51 #endif // COMPONENTS_MUS_CONNECTION_MANAGER_DELEGATE_H_ | 48 #endif // COMPONENTS_MUS_CONNECTION_MANAGER_DELEGATE_H_ |
| OLD | NEW |