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

Unified Diff: components/exo/wm_helper_mus.h

Issue 2264503003: exo: WMHelperMus: Hook up event handlers for mus+ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove changes in pointer.cc 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 | « no previous file | 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 6a6f6fe59ab89eea1cefad9b88aabd1bb28980ba..379c5d3f489e0a7798adfb6bdf2a2d99ed9ca761 100644
--- a/components/exo/wm_helper_mus.h
+++ b/components/exo/wm_helper_mus.h
@@ -9,11 +9,15 @@
#include "components/exo/wm_helper.h"
#include "services/ui/public/cpp/window_tree_client_observer.h"
#include "ui/aura/client/focus_change_observer.h"
+#include "ui/aura/env_observer.h"
+#include "ui/events/event_handler.h"
namespace exo {
// A helper class for accessing WindowManager related features.
class WMHelperMus : public WMHelper,
+ public aura::EnvObserver,
+ public ui::EventHandler,
public ui::WindowTreeClientObserver,
public aura::client::FocusChangeObserver {
public:
@@ -33,6 +37,10 @@ class WMHelperMus : public WMHelper,
void RemovePostTargetHandler(ui::EventHandler* handler) override;
bool IsMaximizeModeWindowManagerEnabled() const override;
+ // Overriden from aura::EnvObserver:
+ void OnWindowInitialized(aura::Window* window) override {}
+ void OnHostInitialized(aura::WindowTreeHost* host) override;
+
// Overriden from ui::WindowTreeClientObserver:
void OnWindowTreeFocusChanged(ui::Window* gained_focus,
ui::Window* lost_focus) override;
@@ -42,6 +50,14 @@ class WMHelperMus : public WMHelper,
aura::Window* lost_focus) override;
private:
+ class EventForwarder;
+
+ ui::EventHandlerList pre_target_list_;
+ ui::EventHandlerList post_target_list_;
+
+ std::unique_ptr<EventForwarder> pre_target_event_forwarder_;
+ std::unique_ptr<EventForwarder> post_target_event_forwarder_;
+
aura::Window* active_window_;
aura::Window* focused_window_;
« no previous file with comments | « no previous file | components/exo/wm_helper_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698