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

Unified Diff: views/widget/widget.h

Issue 7727001: Adds yet more debugging in hopes of tracking 91396. The latest data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add back include merge stripped out Created 9 years, 4 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 | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget.h
diff --git a/views/widget/widget.h b/views/widget/widget.h
index a85b6190cbd18e07de393c7e86065b46eccbb1b6..70e527c57b694a787bc2d9d9144682fac2c3b9ef 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -101,6 +101,20 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
typedef std::set<Widget*> Widgets;
+ enum DestroyState {
+ // The default, everything is good and alive.
+ DESTROY_STATE_NONE = 1,
+
+ // Set once OnNativeWidgetDestroying has been invoked.
+ DESTROY_STATE_IN_DESTROYING,
+
+ // Set once OnNativeWidgetDestroyed has been invoked.
+ DESTROY_STATE_DESTROYED,
+
+ // Set once the destructor is invoked.
+ DESTROY_STATE_DELETED,
+ };
+
enum FrameType {
FRAME_TYPE_DEFAULT, // Use whatever the default would be.
FRAME_TYPE_FORCE_CUSTOM, // Force the custom frame.
@@ -564,6 +578,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// TYPE_CONTROL and TYPE_TOOLTIP is not considered top level.
bool is_top_level() const { return is_top_level_; }
+ DestroyState destroy_state() const { return destroy_state_; }
+
// Overridden from NativeWidgetDelegate:
virtual bool IsModal() const OVERRIDE;
virtual bool IsDialogBox() const OVERRIDE;
@@ -727,6 +743,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// Factory used to create Compositors. Settable by tests.
static ui::Compositor*(*compositor_factory_)();
+ // Tracks destroy state.
+ // TODO(sky): remove this, used in tracking 91396.
+ DestroyState destroy_state_;
+
DISALLOW_COPY_AND_ASSIGN(Widget);
};
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698