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

Unified Diff: trunk/src/mojo/examples/sample_view_manager_app/sample_view_manager_app.cc

Issue 280023002: Revert 269414 "Changes to deletion/ownership of nodes in the cli..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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 | « no previous file | trunk/src/mojo/services/public/cpp/view_manager/lib/view_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/mojo/examples/sample_view_manager_app/sample_view_manager_app.cc
===================================================================
--- trunk/src/mojo/examples/sample_view_manager_app/sample_view_manager_app.cc (revision 269420)
+++ trunk/src/mojo/examples/sample_view_manager_app/sample_view_manager_app.cc (working copy)
@@ -32,12 +32,11 @@
explicit SampleApp(MojoHandle shell_handle)
: Application(shell_handle) {
view_manager_.reset(new services::view_manager::ViewManager(shell()));
- view_manager_->Init();
- services::view_manager::ViewTreeNode* node1 =
- services::view_manager::ViewTreeNode::Create(view_manager_.get());
- services::view_manager::ViewTreeNode* node11 =
- services::view_manager::ViewTreeNode::Create(view_manager_.get());
- node1->AddChild(node11);
+ node_1_.reset(
+ new services::view_manager::ViewTreeNode(view_manager_.get()));
+ node_11_.reset(
+ new services::view_manager::ViewTreeNode(view_manager_.get()));
+ node_1_->AddChild(node_11_.get());
}
virtual ~SampleApp() {
@@ -46,6 +45,8 @@
private:
// SampleApp creates a ViewManager and a trivial node hierarchy.
scoped_ptr<services::view_manager::ViewManager> view_manager_;
+ scoped_ptr<services::view_manager::ViewTreeNode> node_1_;
+ scoped_ptr<services::view_manager::ViewTreeNode> node_11_;
DISALLOW_COPY_AND_ASSIGN(SampleApp);
};
« no previous file with comments | « no previous file | trunk/src/mojo/services/public/cpp/view_manager/lib/view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698