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

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

Issue 383763003: Trigger Node destruction notifications from Node's dtor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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_delegate.h ('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 c8e8c5fb81e7d53a3e8ab10ca9ae421a24f46be6..12a862b4fb304cf8244273a846736b06690c261e 100644
--- a/mojo/services/view_manager/root_node_manager.h
+++ b/mojo/services/view_manager/root_node_manager.h
@@ -114,7 +114,7 @@ class MOJO_VIEW_MANAGER_EXPORT RootNodeManager
// Returns the View identified by |id|.
View* GetView(const ViewId& id);
- Node* root() { return &root_; }
+ Node* root() { return root_.get(); }
bool IsProcessingChange() const { return current_change_ != NULL; }
@@ -137,6 +137,7 @@ class MOJO_VIEW_MANAGER_EXPORT RootNodeManager
// These functions trivially delegate to all ViewManagerServiceImpls, which in
// term notify their clients.
+ void ProcessNodeDestroyed(Node* node);
void ProcessNodeBoundsChanged(const Node* node,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds);
@@ -187,6 +188,7 @@ class MOJO_VIEW_MANAGER_EXPORT RootNodeManager
const Array<Id>& node_ids);
// Overridden from NodeDelegate:
+ virtual void OnNodeDestroyed(const Node* node) OVERRIDE;
virtual void OnNodeHierarchyChanged(const Node* node,
const Node* new_parent,
const Node* old_parent) OVERRIDE;
@@ -214,7 +216,7 @@ class MOJO_VIEW_MANAGER_EXPORT RootNodeManager
RootViewManager root_view_manager_;
// Root node.
- Node root_;
+ scoped_ptr<Node> root_;
// Set of ViewManagerServiceImpls created by way of Connect(). These have to
// be explicitly destroyed.
« no previous file with comments | « mojo/services/view_manager/node_delegate.h ('k') | mojo/services/view_manager/root_node_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698