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

Unified Diff: components/exo/wm_helper_mus.h

Issue 2261473002: exo: WMHelperMus: Add focus and activation support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a review issue Created 4 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 | « components/exo/DEPS ('k') | components/exo/wm_helper_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/wm_helper_mus.h
diff --git a/components/exo/wm_helper_mus.h b/components/exo/wm_helper_mus.h
index ea03df71de97afae787a732eb0a0211e8d17b868..6a6f6fe59ab89eea1cefad9b88aabd1bb28980ba 100644
--- a/components/exo/wm_helper_mus.h
+++ b/components/exo/wm_helper_mus.h
@@ -7,11 +7,15 @@
#include "base/macros.h"
#include "components/exo/wm_helper.h"
+#include "services/ui/public/cpp/window_tree_client_observer.h"
+#include "ui/aura/client/focus_change_observer.h"
namespace exo {
// A helper class for accessing WindowManager related features.
-class WMHelperMus : public WMHelper {
+class WMHelperMus : public WMHelper,
+ public ui::WindowTreeClientObserver,
+ public aura::client::FocusChangeObserver {
public:
WMHelperMus();
~WMHelperMus() override;
@@ -29,7 +33,18 @@ class WMHelperMus : public WMHelper {
void RemovePostTargetHandler(ui::EventHandler* handler) override;
bool IsMaximizeModeWindowManagerEnabled() const override;
+ // Overriden from ui::WindowTreeClientObserver:
+ void OnWindowTreeFocusChanged(ui::Window* gained_focus,
+ ui::Window* lost_focus) override;
+
+ // Overriden from ui::client::FocusChangeObserver:
+ void OnWindowFocused(aura::Window* gained_focus,
+ aura::Window* lost_focus) override;
+
private:
+ aura::Window* active_window_;
+ aura::Window* focused_window_;
+
DISALLOW_COPY_AND_ASSIGN(WMHelperMus);
};
« no previous file with comments | « components/exo/DEPS ('k') | components/exo/wm_helper_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698