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

Side by Side Diff: ash/common/wm/always_on_top_controller.h

Issue 2699033002: Replace WmWindowObserver with aura::WindowObserver. (Closed)
Patch Set: Check for null images in ShelfWindowWatcher. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_COMMON_WM_ALWAYS_ON_TOP_CONTROLLER_H_ 5 #ifndef ASH_COMMON_WM_ALWAYS_ON_TOP_CONTROLLER_H_
6 #define ASH_COMMON_WM_ALWAYS_ON_TOP_CONTROLLER_H_ 6 #define ASH_COMMON_WM_ALWAYS_ON_TOP_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/common/wm_window_observer.h"
12 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "ui/aura/window_observer.h"
13 13
14 namespace ash { 14 namespace ash {
15
16 class WmWindow;
15 class WorkspaceLayoutManager; 17 class WorkspaceLayoutManager;
16 18
17 // AlwaysOnTopController puts window into proper containers based on its 19 // AlwaysOnTopController puts window into proper containers based on its
18 // 'AlwaysOnTop' property. That is, putting a window into the worskpace 20 // 'AlwaysOnTop' property. That is, putting a window into the worskpace
19 // container if its "AlwaysOnTop" property is false. Otherwise, put it in 21 // container if its "AlwaysOnTop" property is false. Otherwise, put it in
20 // |always_on_top_container_|. 22 // |always_on_top_container_|.
21 class ASH_EXPORT AlwaysOnTopController : public WmWindowObserver { 23 class ASH_EXPORT AlwaysOnTopController : public aura::WindowObserver {
22 public: 24 public:
23 explicit AlwaysOnTopController(WmWindow* viewport); 25 explicit AlwaysOnTopController(WmWindow* viewport);
24 ~AlwaysOnTopController() override; 26 ~AlwaysOnTopController() override;
25 27
26 // Gets container for given |window| based on its "AlwaysOnTop" property. 28 // Gets container for given |window| based on its "AlwaysOnTop" property.
27 WmWindow* GetContainer(WmWindow* window) const; 29 WmWindow* GetContainer(WmWindow* window) const;
28 30
29 WorkspaceLayoutManager* GetLayoutManager() const; 31 WorkspaceLayoutManager* GetLayoutManager() const;
30 32
31 void SetLayoutManagerForTest( 33 void SetLayoutManagerForTest(
32 std::unique_ptr<WorkspaceLayoutManager> layout_manager); 34 std::unique_ptr<WorkspaceLayoutManager> layout_manager);
33 35
34 private: 36 private:
35 // Overridden from WmWindowObserver: 37 // Overridden from aura::WindowObserver:
36 void OnWindowTreeChanged(WmWindow* window, 38 void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override;
37 const TreeChangeParams& params) override; 39 void OnWindowPropertyChanged(aura::Window* window,
38 void OnWindowPropertyChanged(WmWindow* window, 40 const void* key,
39 WmWindowProperty property) override; 41 intptr_t old) override;
40 void OnWindowDestroying(WmWindow* window) override; 42 void OnWindowDestroying(aura::Window* window) override;
41 43
42 WmWindow* always_on_top_container_; 44 WmWindow* always_on_top_container_;
43 45
44 DISALLOW_COPY_AND_ASSIGN(AlwaysOnTopController); 46 DISALLOW_COPY_AND_ASSIGN(AlwaysOnTopController);
45 }; 47 };
46 48
47 } // namepsace ash 49 } // namepsace ash
48 50
49 #endif // ASH_COMMON_WM_ALWAYS_ON_TOP_CONTROLLER_H_ 51 #endif // ASH_COMMON_WM_ALWAYS_ON_TOP_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/common/wallpaper/wallpaper_widget_controller.cc ('k') | ash/common/wm/always_on_top_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698