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

Unified Diff: ui/aura/window_destruction_observer.cc

Issue 12929002: Observe for window's (self) deletion during activation/focus change (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 9 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
Index: ui/aura/window_destruction_observer.cc
diff --git a/ui/aura/window_destruction_observer.cc b/ui/aura/window_destruction_observer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d689450f3a7094478b37e7c7696ebd0ee3da49e0
--- /dev/null
+++ b/ui/aura/window_destruction_observer.cc
@@ -0,0 +1,23 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/aura/window_destruction_observer.h"
+
+namespace aura {
+
+WindowDestructionObserver::WindowDestructionObserver() {
+}
+
+WindowDestructionObserver::~WindowDestructionObserver() {
+}
+
+bool WindowDestructionObserver::was_destroyed(const Window* window) const {
+ return destroyed_windows_.find(window) != destroyed_windows_.end();
+}
+
+void WindowDestructionObserver::OnWindowDestroyed(Window* window) {
+ destroyed_windows_.insert(window);
+}
+
+} // namespace aura

Powered by Google App Engine
This is Rietveld 408576698