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

Unified Diff: ash/wm/always_on_top_controller.h

Issue 1923983003: Makes WorkspaceLayoutManager use ash/wm/common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix always-on-top and remove mus changes Created 4 years, 8 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
Index: ash/wm/always_on_top_controller.h
diff --git a/ash/wm/always_on_top_controller.h b/ash/wm/always_on_top_controller.h
index 47dcbc54b7db07b0eeec5be05a5ed386dcc6f302..dac4cd30435e2fa7e4d9c946ae0d61c0477ff94e 100644
--- a/ash/wm/always_on_top_controller.h
+++ b/ash/wm/always_on_top_controller.h
@@ -5,14 +5,11 @@
#ifndef ASH_WM_ALWAYS_ON_TOP_CONTROLLER_H_
#define ASH_WM_ALWAYS_ON_TOP_CONTROLLER_H_
+#include <memory>
+
#include "ash/ash_export.h"
-#include "base/compiler_specific.h"
+#include "ash/wm/common/wm_window_observer.h"
#include "base/macros.h"
-#include "ui/aura/window_observer.h"
-
-namespace aura {
-class Window;
-}
namespace ash {
class WorkspaceLayoutManager;
@@ -21,28 +18,29 @@ class WorkspaceLayoutManager;
// 'AlwaysOnTop' property. That is, putting a window into the worskpace
// container if its "AlwaysOnTop" property is false. Otherwise, put it in
// |always_on_top_container_|.
-class ASH_EXPORT AlwaysOnTopController : public aura::WindowObserver {
+class ASH_EXPORT AlwaysOnTopController : public wm::WmWindowObserver {
public:
- explicit AlwaysOnTopController(aura::Window* viewport);
+ explicit AlwaysOnTopController(wm::WmWindow* viewport);
~AlwaysOnTopController() override;
// Gets container for given |window| based on its "AlwaysOnTop" property.
- aura::Window* GetContainer(aura::Window* window) const;
+ wm::WmWindow* GetContainer(wm::WmWindow* window) const;
WorkspaceLayoutManager* GetLayoutManager() const;
- void SetLayoutManagerForTest(WorkspaceLayoutManager* layout_manager);
+ void SetLayoutManagerForTest(
+ std::unique_ptr<WorkspaceLayoutManager> layout_manager);
private:
- // Overridden from aura::WindowObserver:
- void OnWindowAdded(aura::Window* child) override;
- void OnWillRemoveWindow(aura::Window* child) override;
- void OnWindowPropertyChanged(aura::Window* window,
- const void* key,
+ // Overridden from wm::WmWindowObserver:
+ void OnWindowTreeChanged(wm::WmWindow* window,
+ const TreeChangeParams& params) override;
+ void OnWindowPropertyChanged(wm::WmWindow* window,
+ wm::WmWindowProperty property,
intptr_t old) override;
- void OnWindowDestroyed(aura::Window* window) override;
+ void OnWindowDestroying(wm::WmWindow* window) override;
- aura::Window* always_on_top_container_;
+ wm::WmWindow* always_on_top_container_;
DISALLOW_COPY_AND_ASSIGN(AlwaysOnTopController);
};

Powered by Google App Engine
This is Rietveld 408576698