Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(827)

Unified Diff: mojo/services/view_manager/root_node_manager.h

Issue 275853002: Revert of Wires up view manager to an actual display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/services/view_manager/node.cc ('k') | mojo/services/view_manager/root_node_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/root_node_manager.h
diff --git a/mojo/services/view_manager/root_node_manager.h b/mojo/services/view_manager/root_node_manager.h
index 91aa8e7cd9024b53b5dbb3725cd31c675b86fcc2..eee4c8c014ded7e5b04837c35ec098f893e2ce06 100644
--- a/mojo/services/view_manager/root_node_manager.h
+++ b/mojo/services/view_manager/root_node_manager.h
@@ -8,16 +8,13 @@
#include <map>
#include "base/basictypes.h"
+#include "mojo/services/native_viewport/native_viewport.mojom.h"
#include "mojo/services/view_manager/ids.h"
#include "mojo/services/view_manager/node.h"
#include "mojo/services/view_manager/node_delegate.h"
-#include "mojo/services/view_manager/root_view_manager.h"
#include "mojo/services/view_manager/view_manager_export.h"
namespace mojo {
-
-class Shell;
-
namespace services {
namespace view_manager {
@@ -26,7 +23,9 @@
// RootNodeManager is responsible for managing the set of ViewManagerConnections
// as well as providing the root of the node hierarchy.
-class MOJO_VIEW_MANAGER_EXPORT RootNodeManager : public NodeDelegate {
+class MOJO_VIEW_MANAGER_EXPORT RootNodeManager
+ : public NativeViewportClient,
+ public NodeDelegate {
public:
// Create when a ViewManagerConnection is about to make a change. Ensures
// clients are notified of the correct change id.
@@ -43,7 +42,7 @@
DISALLOW_COPY_AND_ASSIGN(ScopedChange);
};
- explicit RootNodeManager(Shell* shell);
+ RootNodeManager();
virtual ~RootNodeManager();
// Returns the id for the next ViewManagerConnection.
@@ -61,8 +60,6 @@
// Returns the View identified by |id|.
View* GetView(const ViewId& id);
- Node* root() { return &root_; }
-
// These functions trivially delegate to all ViewManagerConnections, which in
// term notify their clients.
void NotifyNodeHierarchyChanged(const NodeId& node,
@@ -73,12 +70,6 @@
const ViewId& old_view_id);
private:
- // Used to setup any static state needed by RootNodeManager.
- struct Context {
- Context();
- ~Context();
- };
-
// Tracks a change.
struct Change {
Change(TransportConnectionId connection_id, TransportChangeId change_id)
@@ -104,6 +95,13 @@
// Balances a call to PrepareForChange().
void FinishChange();
+ // Overridden from NativeViewportClient:
+ virtual void OnCreated() OVERRIDE;
+ virtual void OnDestroyed() OVERRIDE;
+ virtual void OnBoundsChanged(const Rect& bounds) OVERRIDE;
+ virtual void OnEvent(const Event& event,
+ const mojo::Callback<void()>& callback) OVERRIDE;
+
// Overriden from NodeDelegate:
virtual void OnNodeHierarchyChanged(const NodeId& node,
const NodeId& new_parent,
@@ -112,21 +110,17 @@
const ViewId& new_view_id,
const ViewId& old_view_id) OVERRIDE;
- Context context_;
-
// ID to use for next ViewManagerConnection.
TransportConnectionId next_connection_id_;
// Set of ViewManagerConnections.
ConnectionMap connection_map_;
+ // Root node.
+ Node root_;
+
// If non-null we're processing a change.
scoped_ptr<Change> change_;
-
- RootViewManager root_view_manager_;
-
- // Root node.
- Node root_;
DISALLOW_COPY_AND_ASSIGN(RootNodeManager);
};
« no previous file with comments | « mojo/services/view_manager/node.cc ('k') | mojo/services/view_manager/root_node_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698