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

Unified Diff: ui/aura/window.cc

Issue 1153633006: Added UMA statistics for changing the active window via click or touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Polish and added unit tests. Created 5 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 | « tools/metrics/histograms/histograms.xml ('k') | ui/views/controls/menu/menu_message_loop_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 69bddfdc77219efb3630e5455df8d1975138c1df..2ced9089a95908525dbd6ecd2f794025e3ce1ec9 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -202,9 +202,11 @@ Window::Window(WindowDelegate* delegate)
}
Window::~Window() {
- if (layer()->owner() == this)
- layer()->CompleteAllAnimations();
- layer()->SuppressPaint();
+ if (layer()) {
danakj 2015/06/03 22:02:50 Not having a layer means you made a Window but did
+ if (layer()->owner() == this)
+ layer()->CompleteAllAnimations();
+ layer()->SuppressPaint();
+ }
// Let the delegate know we're in the processing of destroying.
if (delegate_)
@@ -260,9 +262,11 @@ Window::~Window() {
}
prop_map_.clear();
- // The layer will either be destroyed by |layer_owner_|'s dtor, or by whoever
- // acquired it.
- layer()->set_delegate(NULL);
+ if (layer()) {
+ // The layer will either be destroyed by |layer_owner_|'s dtor, or by
+ // whoever acquired it.
+ layer()->set_delegate(NULL);
+ }
DestroyLayer();
}
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | ui/views/controls/menu/menu_message_loop_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698