| 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_SHELF_WM_SHELF_H_ | 5 #ifndef ASH_COMMON_SHELF_WM_SHELF_H_ |
| 6 #define ASH_COMMON_SHELF_WM_SHELF_H_ | 6 #define ASH_COMMON_SHELF_WM_SHELF_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/shelf/shelf_types.h" | 9 #include "ash/common/shelf/shelf_types.h" |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 virtual gfx::Rect GetIdealBounds() = 0; | 69 virtual gfx::Rect GetIdealBounds() = 0; |
| 70 | 70 |
| 71 virtual gfx::Rect GetUserWorkAreaBounds() const = 0; | 71 virtual gfx::Rect GetUserWorkAreaBounds() const = 0; |
| 72 | 72 |
| 73 virtual void UpdateIconPositionForWindow(WmWindow* window) = 0; | 73 virtual void UpdateIconPositionForWindow(WmWindow* window) = 0; |
| 74 | 74 |
| 75 // Returns the screen bounds of the item for the specified window. If there is | 75 // Returns the screen bounds of the item for the specified window. If there is |
| 76 // no item for the specified window an empty rect is returned. | 76 // no item for the specified window an empty rect is returned. |
| 77 virtual gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window) = 0; | 77 virtual gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window) = 0; |
| 78 | 78 |
| 79 // Handles a gesture |event| coming from a |target_window| outside the shelf | 79 // Handles a gesture |event| coming from a source outside the shelf widget |
| 80 // (e.g. the status area widget). Allows support for behaviors like toggling | 80 // (e.g. the status area widget). Allows support for behaviors like toggling |
| 81 // auto-hide with an edge swipe, even if that gesture event hits another | 81 // auto-hide with a swipe, even if that gesture event hits another window. |
| 82 // window. Returns true if the event was handled. | 82 // Returns true if the event was handled. |
| 83 virtual bool ProcessGestureEvent(const ui::GestureEvent& event, | 83 virtual bool ProcessGestureEvent(const ui::GestureEvent& event) = 0; |
| 84 WmWindow* target_window) = 0; | |
| 85 | 84 |
| 86 // TODO(jamescook): Nuke when ash_sysui is removed. http://crbug.com/621112 | 85 // TODO(jamescook): Nuke when ash_sysui is removed. http://crbug.com/621112 |
| 87 virtual void UpdateAutoHideForMouseEvent(ui::MouseEvent* event) = 0; | 86 virtual void UpdateAutoHideForMouseEvent(ui::MouseEvent* event) = 0; |
| 88 virtual void UpdateAutoHideForGestureEvent(ui::GestureEvent* event) = 0; | 87 virtual void UpdateAutoHideForGestureEvent(ui::GestureEvent* event) = 0; |
| 89 | 88 |
| 90 virtual void AddObserver(WmShelfObserver* observer) = 0; | 89 virtual void AddObserver(WmShelfObserver* observer) = 0; |
| 91 virtual void RemoveObserver(WmShelfObserver* observer) = 0; | 90 virtual void RemoveObserver(WmShelfObserver* observer) = 0; |
| 92 | 91 |
| 93 // Simulates a virtual keyboard bounds update. | 92 // Simulates a virtual keyboard bounds update. |
| 94 virtual void SetKeyboardBoundsForTesting(const gfx::Rect& bounds) = 0; | 93 virtual void SetKeyboardBoundsForTesting(const gfx::Rect& bounds) = 0; |
| 95 | 94 |
| 96 virtual ShelfLockingManager* GetShelfLockingManagerForTesting() = 0; | 95 virtual ShelfLockingManager* GetShelfLockingManagerForTesting() = 0; |
| 97 virtual ShelfView* GetShelfViewForTesting() = 0; | 96 virtual ShelfView* GetShelfViewForTesting() = 0; |
| 98 | 97 |
| 99 protected: | 98 protected: |
| 100 virtual ~WmShelf() {} | 99 virtual ~WmShelf() {} |
| 101 }; | 100 }; |
| 102 | 101 |
| 103 } // namespace ash | 102 } // namespace ash |
| 104 | 103 |
| 105 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ | 104 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ |
| OLD | NEW |