| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_WM_AURA_WM_ROOT_CONTROLLER_AURA_H_ | |
| 6 #define ASH_WM_AURA_WM_ROOT_CONTROLLER_AURA_H_ | |
| 7 | |
| 8 #include "ash/ash_export.h" | |
| 9 #include "ash/common/wm/wm_root_window_controller.h" | |
| 10 #include "ash/shell_observer.h" | |
| 11 #include "base/macros.h" | |
| 12 #include "base/observer_list.h" | |
| 13 | |
| 14 namespace aura { | |
| 15 class Window; | |
| 16 } | |
| 17 | |
| 18 namespace ash { | |
| 19 | |
| 20 class RootWindowController; | |
| 21 | |
| 22 namespace wm { | |
| 23 | |
| 24 class ASH_EXPORT WmRootWindowControllerAura : public WmRootWindowController, | |
| 25 public ShellObserver { | |
| 26 public: | |
| 27 explicit WmRootWindowControllerAura( | |
| 28 RootWindowController* root_window_controller); | |
| 29 ~WmRootWindowControllerAura() override; | |
| 30 | |
| 31 static WmRootWindowControllerAura* Get(aura::Window* window) { | |
| 32 return const_cast<WmRootWindowControllerAura*>( | |
| 33 Get(const_cast<const aura::Window*>(window))); | |
| 34 } | |
| 35 static const WmRootWindowControllerAura* Get(const aura::Window* window); | |
| 36 | |
| 37 // WmRootWindowController: | |
| 38 bool HasShelf() override; | |
| 39 WmGlobals* GetGlobals() override; | |
| 40 WorkspaceWindowState GetWorkspaceWindowState() override; | |
| 41 AlwaysOnTopController* GetAlwaysOnTopController() override; | |
| 42 WmShelf* GetShelf() override; | |
| 43 WmWindow* GetWindow() override; | |
| 44 void ConfigureWidgetInitParamsForContainer( | |
| 45 views::Widget* widget, | |
| 46 int shell_container_id, | |
| 47 views::Widget::InitParams* init_params) override; | |
| 48 WmWindow* FindEventTarget(const gfx::Point& location_in_screen) override; | |
| 49 void AddObserver(WmRootWindowControllerObserver* observer) override; | |
| 50 void RemoveObserver(WmRootWindowControllerObserver* observer) override; | |
| 51 | |
| 52 // ShellObserver: | |
| 53 void OnDisplayWorkAreaInsetsChanged() override; | |
| 54 void OnFullscreenStateChanged(bool is_fullscreen, | |
| 55 aura::Window* root_window) override; | |
| 56 void OnShelfAlignmentChanged(aura::Window* root_window) override; | |
| 57 | |
| 58 private: | |
| 59 RootWindowController* root_window_controller_; | |
| 60 base::ObserverList<WmRootWindowControllerObserver> observers_; | |
| 61 | |
| 62 DISALLOW_COPY_AND_ASSIGN(WmRootWindowControllerAura); | |
| 63 }; | |
| 64 | |
| 65 } // namespace wm | |
| 66 } // namespace ash | |
| 67 | |
| 68 #endif // ASH_WM_AURA_WM_ROOT_CONTROLLER_AURA_H_ | |
| OLD | NEW |