| Index: trunk/src/mojo/services/view_manager/view_manager_connection.h
|
| ===================================================================
|
| --- trunk/src/mojo/services/view_manager/view_manager_connection.h (revision 270872)
|
| +++ trunk/src/mojo/services/view_manager/view_manager_connection.h (working copy)
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| +#include "mojo/public/cpp/shell/service.h"
|
| #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
|
| #include "mojo/services/view_manager/ids.h"
|
| #include "mojo/services/view_manager/node_delegate.h"
|
| @@ -31,17 +32,18 @@
|
|
|
| // Manages a connection from the client.
|
| class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
|
| - : public InterfaceImpl<IViewManager>,
|
| + : public ServiceConnection<IViewManager, ViewManagerConnection,
|
| + RootNodeManager>,
|
| public NodeDelegate {
|
| public:
|
| - ViewManagerConnection(RootNodeManager* root_node_manager);
|
| + ViewManagerConnection();
|
| virtual ~ViewManagerConnection();
|
|
|
| - virtual void OnConnectionEstablished() MOJO_OVERRIDE;
|
| - virtual void OnConnectionError() MOJO_OVERRIDE;
|
| -
|
| TransportConnectionId id() const { return id_; }
|
|
|
| + // Invoked when connection is established.
|
| + void Initialize();
|
| +
|
| // Returns the Node with the specified id.
|
| Node* GetNode(const NodeId& id);
|
|
|
| @@ -109,10 +111,9 @@
|
| virtual void OnNodeViewReplaced(const NodeId& node,
|
| const ViewId& new_view_id,
|
| const ViewId& old_view_id) OVERRIDE;
|
| - RootNodeManager* root_node_manager_;
|
|
|
| // Id of this connection as assigned by RootNodeManager. Assigned in
|
| - // OnConnectionEstablished().
|
| + // Initialize().
|
| TransportConnectionId id_;
|
|
|
| NodeMap node_map_;
|
|
|