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

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

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/shadow_controller_unittest.cc ('k') | ui/wm/core/transient_window_controller.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.h
diff --git a/ui/wm/core/transient_window_controller.h b/ui/wm/core/transient_window_controller.h
index 2ba28bb778041ad75fdf73c464efa9d2970c7370..1f7a0c42edc43d58aaa18566ad608f4bed58755a 100644
--- a/ui/wm/core/transient_window_controller.h
+++ b/ui/wm/core/transient_window_controller.h
@@ -6,11 +6,14 @@
#define UI_WM_CORE_TRANSIENT_WINDOW_CONTROLLER_H_
#include "base/macros.h"
-#include "ui/wm/public/transient_window_client.h"
+#include "base/observer_list.h"
+#include "ui/aura/client/transient_window_client.h"
#include "ui/wm/wm_export.h"
namespace wm {
+class TransientWindowManager;
+
// TransientWindowClient implementation. Uses TransientWindowManager to handle
// tracking transient per window.
class WM_EXPORT TransientWindowController
@@ -19,13 +22,26 @@ class WM_EXPORT TransientWindowController
TransientWindowController();
~TransientWindowController() override;
+ // Returns the single TransientWindowController instance.
+ static TransientWindowController* Get() { return instance_; }
+
// TransientWindowClient:
void AddTransientChild(aura::Window* parent, aura::Window* child) override;
void RemoveTransientChild(aura::Window* parent, aura::Window* child) override;
aura::Window* GetTransientParent(aura::Window* window) override;
const aura::Window* GetTransientParent(const aura::Window* window) override;
+ void AddObserver(
+ aura::client::TransientWindowClientObserver* observer) override;
+ void RemoveObserver(
+ aura::client::TransientWindowClientObserver* observer) override;
private:
+ friend class TransientWindowManager;
+
+ static TransientWindowController* instance_;
+
+ base::ObserverList<aura::client::TransientWindowClientObserver> observers_;
+
DISALLOW_COPY_AND_ASSIGN(TransientWindowController);
};
« no previous file with comments | « ui/wm/core/shadow_controller_unittest.cc ('k') | ui/wm/core/transient_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698