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

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

Issue 274733004: Deletion/ownership (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 | « no previous file | 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: mojo/examples/sample_view_manager_app/sample_view_manager_app.cc
diff --git a/mojo/examples/sample_view_manager_app/sample_view_manager_app.cc b/mojo/examples/sample_view_manager_app/sample_view_manager_app.cc
index 43ee7f2a8b9c10819dcfa4a492e54eca28a6ee1c..69d6a4491449aab4d179e8a85902e60d96726edb 100644
--- a/mojo/examples/sample_view_manager_app/sample_view_manager_app.cc
+++ b/mojo/examples/sample_view_manager_app/sample_view_manager_app.cc
@@ -32,11 +32,12 @@ class SampleApp : public Application {
explicit SampleApp(MojoHandle shell_handle)
: Application(shell_handle) {
view_manager_.reset(new services::view_manager::ViewManager(shell()));
- 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());
+ 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);
}
virtual ~SampleApp() {
@@ -45,8 +46,6 @@ class SampleApp : public Application {
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 | 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