| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_WM_COMMON_WM_GLOBALS_H_ | 5 #ifndef ASH_WM_COMMON_WM_GLOBALS_H_ |
| 6 #define ASH_WM_COMMON_WM_GLOBALS_H_ | 6 #define ASH_WM_COMMON_WM_GLOBALS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <vector> | 10 #include <vector> |
| 9 | 11 |
| 10 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
| 11 | 13 |
| 12 namespace gfx { | 14 namespace gfx { |
| 13 class Rect; | 15 class Rect; |
| 14 } | 16 } |
| 15 | 17 |
| 16 namespace ash { | 18 namespace ash { |
| 17 namespace wm { | 19 namespace wm { |
| 18 | 20 |
| 19 class WmWindow; | 21 class WmWindow; |
| 20 | 22 |
| 21 // Used for accessing global state. | 23 // Used for accessing global state. |
| 22 class ASH_EXPORT WmGlobals { | 24 class ASH_EXPORT WmGlobals { |
| 23 public: | 25 public: |
| 24 virtual ~WmGlobals() {} | 26 virtual ~WmGlobals() {} |
| 25 | 27 |
| 26 // This is necessary for a handful of places that is difficult to plumb | 28 // This is necessary for a handful of places that is difficult to plumb |
| 27 // through context. | 29 // through context. |
| 28 static WmGlobals* Get(); | 30 static WmGlobals* Get(); |
| 29 | 31 |
| 30 virtual WmWindow* GetActiveWindow() = 0; | 32 virtual WmWindow* GetActiveWindow() = 0; |
| 31 | 33 |
| 34 // Returns the root window for the specified display. |
| 35 virtual WmWindow* GetRootWindowForDisplayId(int64_t display_id) = 0; |
| 36 |
| 32 // Returns the root window that newly created windows should be added to. | 37 // Returns the root window that newly created windows should be added to. |
| 33 // NOTE: this returns the root, newly created window should be added to the | 38 // NOTE: this returns the root, newly created window should be added to the |
| 34 // appropriate container in the returned window. | 39 // appropriate container in the returned window. |
| 35 virtual WmWindow* GetRootWindowForNewWindows() = 0; | 40 virtual WmWindow* GetRootWindowForNewWindows() = 0; |
| 36 | 41 |
| 37 // returns the list of more recently used windows excluding modals. | 42 // returns the list of more recently used windows excluding modals. |
| 38 virtual std::vector<WmWindow*> GetMruWindowListIgnoreModals() = 0; | 43 virtual std::vector<WmWindow*> GetMruWindowListIgnoreModals() = 0; |
| 39 | 44 |
| 40 // Returns true if the first window shown on first run should be | 45 // Returns true if the first window shown on first run should be |
| 41 // unconditionally maximized, overriding the heuristic that normally chooses | 46 // unconditionally maximized, overriding the heuristic that normally chooses |
| 42 // the window size. | 47 // the window size. |
| 43 virtual bool IsForceMaximizeOnFirstRun() = 0; | 48 virtual bool IsForceMaximizeOnFirstRun() = 0; |
| 44 | 49 |
| 45 virtual std::vector<WmWindow*> GetAllRootWindows() = 0; | 50 virtual std::vector<WmWindow*> GetAllRootWindows() = 0; |
| 46 }; | 51 }; |
| 47 | 52 |
| 48 } // namespace wm | 53 } // namespace wm |
| 49 } // namespace ash | 54 } // namespace ash |
| 50 | 55 |
| 51 #endif // ASH_WM_COMMON_WM_GLOBALS_H_ | 56 #endif // ASH_WM_COMMON_WM_GLOBALS_H_ |
| OLD | NEW |