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

Unified Diff: ui/wm/core/transient_window_controller.cc

Issue 2453953003: Moves TransientWindowClient to ui/aura/client and adds observer (Closed)
Patch Set: merge Created 4 years, 2 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 | « ui/wm/core/transient_window_controller.h ('k') | ui/wm/core/transient_window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/transient_window_controller.cc
diff --git a/ui/wm/core/transient_window_controller.cc b/ui/wm/core/transient_window_controller.cc
index bb1945c09b2e89e75fe20f54ba3e618cfe39f034..f1fc00d1a012de83c541464f61a8681873ec3ade 100644
--- a/ui/wm/core/transient_window_controller.cc
+++ b/ui/wm/core/transient_window_controller.cc
@@ -4,14 +4,22 @@
#include "ui/wm/core/transient_window_controller.h"
+#include "ui/aura/client/transient_window_client_observer.h"
#include "ui/wm/core/transient_window_manager.h"
namespace wm {
+// static
+TransientWindowController* TransientWindowController::instance_ = nullptr;
+
TransientWindowController::TransientWindowController() {
+ DCHECK(!instance_);
+ instance_ = this;
}
TransientWindowController::~TransientWindowController() {
+ DCHECK_EQ(instance_, this);
+ instance_ = nullptr;
}
void TransientWindowController::AddTransientChild(aura::Window* parent,
@@ -37,4 +45,14 @@ const aura::Window* TransientWindowController::GetTransientParent(
return window_manager ? window_manager->transient_parent() : NULL;
}
+void TransientWindowController::AddObserver(
+ aura::client::TransientWindowClientObserver* observer) {
+ observers_.AddObserver(observer);
+}
+
+void TransientWindowController::RemoveObserver(
+ aura::client::TransientWindowClientObserver* observer) {
+ observers_.RemoveObserver(observer);
+}
+
} // namespace wm
« no previous file with comments | « ui/wm/core/transient_window_controller.h ('k') | ui/wm/core/transient_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698