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

Unified Diff: ash/mus/bridge/wm_shell_mus.h

Issue 2539363005: Converts ash to use aura-mus (Closed)
Patch Set: merge 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: ash/mus/bridge/wm_shell_mus.h
diff --git a/ash/mus/bridge/wm_shell_mus.h b/ash/mus/bridge/wm_shell_mus.h
index 2ee1be06de0426d0f8781bcca8c947338ed9e153..62e84d5189152160b8ca263d8334f1ef28cb0b73 100644
--- a/ash/mus/bridge/wm_shell_mus.h
+++ b/ash/mus/bridge/wm_shell_mus.h
@@ -13,14 +13,14 @@
#include "ash/common/wm_shell.h"
#include "base/macros.h"
#include "base/observer_list.h"
-#include "services/ui/public/cpp/window_tree_client_observer.h"
+#include "ui/wm/public/activation_change_observer.h"
-namespace ui {
+namespace aura {
class WindowTreeClient;
}
namespace views {
-class PointerWatcherEventRouter;
+class PointerWatcherEventRouter2;
}
namespace ash {
@@ -35,11 +35,12 @@ class WmShellMusTestApi;
class WmWindowMus;
// WmShell implementation for mus.
-class WmShellMus : public WmShell, public ui::WindowTreeClientObserver {
+class WmShellMus : public WmShell,
+ public aura::client::ActivationChangeObserver {
public:
WmShellMus(std::unique_ptr<ShellDelegate> shell_delegate,
WindowManager* window_manager,
- views::PointerWatcherEventRouter* pointer_watcher_event_router);
+ views::PointerWatcherEventRouter2* pointer_watcher_event_router);
~WmShellMus() override;
static WmShellMus* Get();
@@ -49,7 +50,7 @@ class WmShellMus : public WmShell, public ui::WindowTreeClientObserver {
// Returns the ancestor of |window| (including |window|) that is considered
// toplevel. |window| may be null.
- static WmWindowMus* GetToplevelAncestor(ui::Window* window);
+ static WmWindowMus* GetToplevelAncestor(aura::Window* window);
WmRootWindowControllerMus* GetRootWindowControllerWithDisplayId(int64_t id);
@@ -57,6 +58,10 @@ class WmShellMus : public WmShell, public ui::WindowTreeClientObserver {
return accelerator_controller_delegate_.get();
}
+ aura::WindowTreeClient* window_tree_client();
+
+ WindowManager* window_manager() { return window_manager_; }
+
// WmShell:
bool IsRunningInMash() const override;
WmWindow* NewWindow(ui::wm::WindowType window_type,
@@ -118,19 +123,17 @@ class WmShellMus : public WmShell, public ui::WindowTreeClientObserver {
private:
friend class WmShellMusTestApi;
- ui::WindowTreeClient* window_tree_client();
-
// Returns true if |window| is a window that can have active children.
- static bool IsActivationParent(ui::Window* window);
+ static bool IsActivationParent(aura::Window* window);
- // ui::WindowTreeClientObserver:
- void OnWindowTreeFocusChanged(ui::Window* gained_focus,
- ui::Window* lost_focus) override;
- void OnDidDestroyClient(ui::WindowTreeClient* client) override;
+ // aura::client::ActivationChangeObserver:
+ void OnWindowActivated(ActivationReason reason,
+ aura::Window* gained_active,
+ aura::Window* lost_active) override;
WindowManager* window_manager_;
- views::PointerWatcherEventRouter* pointer_watcher_event_router_;
+ views::PointerWatcherEventRouter2* pointer_watcher_event_router_;
std::vector<WmRootWindowControllerMus*> root_window_controllers_;

Powered by Google App Engine
This is Rietveld 408576698