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

Unified Diff: components/exo/wm_helper_mus.h

Issue 2578893003: Converts chrome to aura-mus (Closed)
Patch Set: merge again Created 4 years 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: components/exo/wm_helper_mus.h
diff --git a/components/exo/wm_helper_mus.h b/components/exo/wm_helper_mus.h
index 13751b23fa07addc178a48414c893053ed4b80b7..f1fb4cc73927eee2a836c7ae4169560354f17bb7 100644
--- a/components/exo/wm_helper_mus.h
+++ b/components/exo/wm_helper_mus.h
@@ -7,16 +7,22 @@
#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"
+#include "ui/aura/env_observer.h"
#include "ui/events/devices/input_device_event_observer.h"
+namespace aura {
+namespace client {
+class ActivationClient;
+}
+}
+
namespace exo {
// A helper class for accessing WindowManager related features.
class WMHelperMus : public WMHelper,
public ui::InputDeviceEventObserver,
- public ui::WindowTreeClientObserver,
+ public aura::EnvObserver,
public aura::client::FocusChangeObserver {
public:
WMHelperMus();
@@ -38,9 +44,10 @@ class WMHelperMus : public WMHelper,
bool IsSpokenFeedbackEnabled() const override;
void PlayEarcon(int sound_key) const override;
- // Overriden from ui::WindowTreeClientObserver:
- void OnWindowTreeFocusChanged(ui::Window* gained_focus,
- ui::Window* lost_focus) override;
+ // Overriden from aura::EnvObserver:
+ void OnWindowInitialized(aura::Window* window) override;
+ void OnActiveFocusClientChanged(aura::client::FocusClient* focus_client,
+ aura::Window* window) override;
// Overriden from ui::client::FocusChangeObserver:
void OnWindowFocused(aura::Window* gained_focus,
@@ -50,8 +57,19 @@ class WMHelperMus : public WMHelper,
void OnKeyboardDeviceConfigurationChanged() override;
private:
- aura::Window* active_window_;
- aura::Window* focused_window_;
+ void SetActiveFocusClient(aura::client::FocusClient* focus_client,
+ aura::Window* window);
+ void SetActiveWindow(aura::Window* window);
+ void SetFocusedWindow(aura::Window* window);
+
+ aura::client::ActivationClient* GetActivationClient();
+
+ // Current FocusClient.
+ aura::client::FocusClient* active_focus_client_ = nullptr;
+ // This is the window that |active_focus_client_| comes from (may be null).
+ aura::Window* root_with_active_focus_client_ = nullptr;
+ aura::Window* active_window_ = nullptr;
+ aura::Window* focused_window_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(WMHelperMus);
};

Powered by Google App Engine
This is Rietveld 408576698