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

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

Issue 383123006: Preliminary interactive layout of window manager's demo_launcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Looks Good 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 | « no previous file | mojo/examples/html_viewer/html_document_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/browser/browser.cc
diff --git a/mojo/examples/browser/browser.cc b/mojo/examples/browser/browser.cc
index ac6f5f1dd1da4d12ecbcae5b9ed982dc3fa2ef82..146c4411a0e14080bfdd536e1631222bc74ccb93 100644
--- a/mojo/examples/browser/browser.cc
+++ b/mojo/examples/browser/browser.cc
@@ -154,6 +154,8 @@ class Browser : public ApplicationDelegate,
Browser() : view_manager_(NULL), root_(NULL), widget_(NULL) {}
virtual ~Browser() {
+ if (root_)
+ root_->RemoveObserver(this);
}
private:
@@ -241,6 +243,7 @@ class Browser : public ApplicationDelegate,
virtual void OnNodeDestroyed(view_manager::Node* node) OVERRIDE {
DCHECK_EQ(root_, node);
node->RemoveObserver(this);
+ root_ = NULL;
}
scoped_ptr<ViewsInit> views_init_;
« no previous file with comments | « no previous file | mojo/examples/html_viewer/html_document_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698