| 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_COMMON_WM_ROOT_CONTROLLER_H_ | |
| 6 #define ASH_WM_COMMON_WM_ROOT_CONTROLLER_H_ | |
| 7 | |
| 8 #include "ash/ash_export.h" | |
| 9 #include "ash/wm/common/workspace/workspace_types.h" | |
| 10 #include "ui/views/widget/widget.h" | |
| 11 | |
| 12 namespace gfx { | |
| 13 class Point; | |
| 14 } | |
| 15 | |
| 16 namespace ash { | |
| 17 | |
| 18 class AlwaysOnTopController; | |
| 19 | |
| 20 namespace wm { | |
| 21 | |
| 22 class WmGlobals; | |
| 23 class WmRootWindowControllerObserver; | |
| 24 class WmShelf; | |
| 25 class WmWindow; | |
| 26 | |
| 27 // Provides state associated with a root of a window hierarchy. | |
| 28 class ASH_EXPORT WmRootWindowController { | |
| 29 public: | |
| 30 virtual ~WmRootWindowController() {} | |
| 31 | |
| 32 virtual bool HasShelf() = 0; | |
| 33 | |
| 34 virtual WmGlobals* GetGlobals() = 0; | |
| 35 | |
| 36 virtual WorkspaceWindowState GetWorkspaceWindowState() = 0; | |
| 37 | |
| 38 virtual AlwaysOnTopController* GetAlwaysOnTopController() = 0; | |
| 39 | |
| 40 virtual WmShelf* GetShelf() = 0; | |
| 41 | |
| 42 // Returns the window associated with this WmRootWindowController. | |
| 43 virtual WmWindow* GetWindow() = 0; | |
| 44 | |
| 45 // Configures |init_params| prior to initializing |widget|. | |
| 46 // |shell_container_id| is the id of the container to parent |widget| to. | |
| 47 virtual void ConfigureWidgetInitParamsForContainer( | |
| 48 views::Widget* widget, | |
| 49 int shell_container_id, | |
| 50 views::Widget::InitParams* init_params) = 0; | |
| 51 | |
| 52 // Returns the window events will be targeted at for the specified location | |
| 53 // (in screen coordinates). | |
| 54 // | |
| 55 // NOTE: the returned window may not contain the location as resize handles | |
| 56 // may extend outside the bounds of the window. | |
| 57 virtual WmWindow* FindEventTarget(const gfx::Point& location_in_screen) = 0; | |
| 58 | |
| 59 virtual void AddObserver(WmRootWindowControllerObserver* observer) = 0; | |
| 60 virtual void RemoveObserver(WmRootWindowControllerObserver* observer) = 0; | |
| 61 }; | |
| 62 | |
| 63 } // namespace wm | |
| 64 } // namespace ash | |
| 65 | |
| 66 #endif // ASH_WM_COMMON_WM_ROOT_CONTROLLER_H_ | |
| OLD | NEW |