| 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_COMMON_WM_SHELL_H_ | 5 #ifndef ASH_COMMON_WM_SHELL_H_ |
| 6 #define ASH_COMMON_WM_SHELL_H_ | 6 #define ASH_COMMON_WM_SHELL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "ash/ash_export.h" | 13 #include "ash/ash_export.h" |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 class Rect; | 16 class Rect; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace ash { | 19 namespace ash { |
| 20 | 20 |
| 21 class SessionStateDelegate; |
| 21 class WindowResizer; | 22 class WindowResizer; |
| 22 class WmActivationObserver; | 23 class WmActivationObserver; |
| 23 class WmDisplayObserver; | 24 class WmDisplayObserver; |
| 24 class WmOverviewModeObserver; | 25 class WmOverviewModeObserver; |
| 25 class WmWindow; | 26 class WmWindow; |
| 26 | 27 |
| 27 namespace wm { | 28 namespace wm { |
| 28 | 29 |
| 29 class WindowState; | 30 class WindowState; |
| 30 | 31 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 virtual std::vector<WmWindow*> GetMruWindowList() = 0; | 63 virtual std::vector<WmWindow*> GetMruWindowList() = 0; |
| 63 | 64 |
| 64 // Returns the list of most recently used windows excluding modals. | 65 // Returns the list of most recently used windows excluding modals. |
| 65 virtual std::vector<WmWindow*> GetMruWindowListIgnoreModals() = 0; | 66 virtual std::vector<WmWindow*> GetMruWindowListIgnoreModals() = 0; |
| 66 | 67 |
| 67 // Returns true if the first window shown on first run should be | 68 // Returns true if the first window shown on first run should be |
| 68 // unconditionally maximized, overriding the heuristic that normally chooses | 69 // unconditionally maximized, overriding the heuristic that normally chooses |
| 69 // the window size. | 70 // the window size. |
| 70 virtual bool IsForceMaximizeOnFirstRun() = 0; | 71 virtual bool IsForceMaximizeOnFirstRun() = 0; |
| 71 | 72 |
| 72 virtual bool IsUserSessionBlocked() = 0; | |
| 73 virtual bool IsScreenLocked() = 0; | |
| 74 | |
| 75 // Returns true if |window| can be shown for the current user. This is | 73 // Returns true if |window| can be shown for the current user. This is |
| 76 // intended to check if the current user matches the user associated with | 74 // intended to check if the current user matches the user associated with |
| 77 // |window|. | 75 // |window|. |
| 78 virtual bool CanShowWindowForUser(WmWindow* window) = 0; | 76 virtual bool CanShowWindowForUser(WmWindow* window) = 0; |
| 79 | 77 |
| 80 // See aura::client::CursorClient for details on these. | 78 // See aura::client::CursorClient for details on these. |
| 81 virtual void LockCursor() = 0; | 79 virtual void LockCursor() = 0; |
| 82 virtual void UnlockCursor() = 0; | 80 virtual void UnlockCursor() = 0; |
| 83 | 81 |
| 84 virtual std::vector<WmWindow*> GetAllRootWindows() = 0; | 82 virtual std::vector<WmWindow*> GetAllRootWindows() = 0; |
| 85 | 83 |
| 86 virtual void RecordUserMetricsAction(wm::WmUserMetricsAction action) = 0; | 84 virtual void RecordUserMetricsAction(wm::WmUserMetricsAction action) = 0; |
| 87 | 85 |
| 88 // Returns a WindowResizer to handle dragging. |next_window_resizer| is | 86 // Returns a WindowResizer to handle dragging. |next_window_resizer| is |
| 89 // the next WindowResizer in the WindowResizer chain. This may return | 87 // the next WindowResizer in the WindowResizer chain. This may return |
| 90 // |next_window_resizer|. | 88 // |next_window_resizer|. |
| 91 virtual std::unique_ptr<WindowResizer> CreateDragWindowResizer( | 89 virtual std::unique_ptr<WindowResizer> CreateDragWindowResizer( |
| 92 std::unique_ptr<WindowResizer> next_window_resizer, | 90 std::unique_ptr<WindowResizer> next_window_resizer, |
| 93 wm::WindowState* window_state) = 0; | 91 wm::WindowState* window_state) = 0; |
| 94 | 92 |
| 95 // TODO(sky): if WindowSelectorController can't be moved over, move these | 93 // TODO(sky): if WindowSelectorController can't be moved over, move these |
| 96 // onto their own local class. | 94 // onto their own local class. |
| 97 virtual bool IsOverviewModeSelecting() = 0; | 95 virtual bool IsOverviewModeSelecting() = 0; |
| 98 virtual bool IsOverviewModeRestoringMinimizedWindows() = 0; | 96 virtual bool IsOverviewModeRestoringMinimizedWindows() = 0; |
| 99 | 97 |
| 98 virtual SessionStateDelegate* GetSessionStateDelegate() = 0; |
| 99 |
| 100 virtual void AddActivationObserver(WmActivationObserver* observer) = 0; | 100 virtual void AddActivationObserver(WmActivationObserver* observer) = 0; |
| 101 virtual void RemoveActivationObserver(WmActivationObserver* observer) = 0; | 101 virtual void RemoveActivationObserver(WmActivationObserver* observer) = 0; |
| 102 | 102 |
| 103 virtual void AddDisplayObserver(WmDisplayObserver* observer) = 0; | 103 virtual void AddDisplayObserver(WmDisplayObserver* observer) = 0; |
| 104 virtual void RemoveDisplayObserver(WmDisplayObserver* observer) = 0; | 104 virtual void RemoveDisplayObserver(WmDisplayObserver* observer) = 0; |
| 105 | 105 |
| 106 virtual void AddOverviewModeObserver(WmOverviewModeObserver* observer) = 0; | 106 virtual void AddOverviewModeObserver(WmOverviewModeObserver* observer) = 0; |
| 107 virtual void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) = 0; | 107 virtual void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) = 0; |
| 108 | 108 |
| 109 private: | 109 private: |
| 110 static WmShell* instance_; | 110 static WmShell* instance_; |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace ash | 113 } // namespace ash |
| 114 | 114 |
| 115 #endif // ASH_COMMON_WM_SHELL_H_ | 115 #endif // ASH_COMMON_WM_SHELL_H_ |
| OLD | NEW |