Chromium Code Reviews| Index: components/view_manager/connection_manager.h |
| diff --git a/components/view_manager/connection_manager.h b/components/view_manager/connection_manager.h |
| index 2cfc37980b84113070c31f6bfc30d5c7b918d0e5..e44a941f4d38aeb74c9e4f72eac0e4fab4d03434 100644 |
| --- a/components/view_manager/connection_manager.h |
| +++ b/components/view_manager/connection_manager.h |
| @@ -11,6 +11,8 @@ |
| #include "base/basictypes.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/timer/timer.h" |
| +#include "cc/surfaces/surface_factory.h" |
| +#include "cc/surfaces/surface_factory_client.h" |
| #include "components/view_manager/animation_runner.h" |
| #include "components/view_manager/event_dispatcher.h" |
| #include "components/view_manager/focus_controller_delegate.h" |
| @@ -19,6 +21,7 @@ |
| #include "components/view_manager/public/interfaces/view_manager_root.mojom.h" |
| #include "components/view_manager/server_view_delegate.h" |
| #include "components/view_manager/server_view_observer.h" |
| +#include "components/view_manager/surfaces/surfaces_state.h" |
| #include "components/view_manager/view_manager_root_impl.h" |
| #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h" |
| #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" |
| @@ -36,7 +39,8 @@ class ViewManagerServiceImpl; |
| // ViewManagerServiceImpls) as well as providing the root of the hierarchy. |
| class ConnectionManager : public ServerViewDelegate, |
| public ServerViewObserver, |
| - public FocusControllerDelegate { |
| + public FocusControllerDelegate, |
| + public cc::SurfaceFactoryClient { |
| public: |
| // Create when a ViewManagerServiceImpl is about to make a change. Ensures |
| // clients are notified correctly. |
| @@ -71,7 +75,9 @@ class ConnectionManager : public ServerViewDelegate, |
| DISALLOW_COPY_AND_ASSIGN(ScopedChange); |
| }; |
| - explicit ConnectionManager(ConnectionManagerDelegate* delegate); |
| + ConnectionManager( |
| + ConnectionManagerDelegate* delegate, |
| + const scoped_refptr<surfaces::SurfacesState>& surfaces_state); |
| ~ConnectionManager() override; |
| // Adds a ViewManagerRoot. |
| @@ -193,6 +199,9 @@ class ConnectionManager : public ServerViewDelegate, |
| const mojo::OrderDirection direction); |
| void ProcessViewDeleted(const ViewId& view); |
| + // SurfaceFactoryClient implementation. |
|
rjkroege
2015/08/13 18:04:01
is this right?
Fady Samuel
2015/08/17 21:11:11
In what sense? It is an interface off SurfaceFacto
|
| + void ReturnResources(const cc::ReturnedResourceArray& resources) override; |
| + |
| private: |
| using ConnectionMap = std::map<mojo::ConnectionSpecificId, ClientConnection*>; |
| using RootConnectionMap = |
| @@ -224,6 +233,9 @@ class ConnectionManager : public ServerViewDelegate, |
| ViewManagerRootImpl* GetViewManagerRootByView(const ServerView* view) const; |
| // Overridden from ServerViewDelegate: |
| + void SubmitFrame(ServerView* view, |
| + mojo::CompositorFramePtr frame, |
| + const mojo::Closure& callback) override; |
| void PrepareToDestroyView(ServerView* view) override; |
| void PrepareToChangeViewHierarchy(ServerView* view, |
| ServerView* new_parent, |
| @@ -262,6 +274,10 @@ class ConnectionManager : public ServerViewDelegate, |
| ConnectionManagerDelegate* delegate_; |
| + scoped_refptr<surfaces::SurfacesState> surfaces_state_; |
| + |
| + cc::SurfaceFactory surface_factory_; |
| + |
| // ID to use for next ViewManagerServiceImpl. |
| mojo::ConnectionSpecificId next_connection_id_; |