| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 virtual gfx::Rect GetIdealBounds() = 0; | 57 virtual gfx::Rect GetIdealBounds() = 0; |
| 58 | 58 |
| 59 virtual gfx::Rect GetUserWorkAreaBounds() const = 0; | 59 virtual gfx::Rect GetUserWorkAreaBounds() const = 0; |
| 60 | 60 |
| 61 virtual void UpdateIconPositionForWindow(WmWindow* window) = 0; | 61 virtual void UpdateIconPositionForWindow(WmWindow* window) = 0; |
| 62 | 62 |
| 63 // Returns the screen bounds of the item for the specified window. If there is | 63 // Returns the screen bounds of the item for the specified window. If there is |
| 64 // no item for the specified window an empty rect is returned. | 64 // no item for the specified window an empty rect is returned. |
| 65 virtual gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window) = 0; | 65 virtual gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window) = 0; |
| 66 | 66 |
| 67 // Handles a gesture |event| coming from a |target_window| outside the shelf |
| 68 // (e.g. the status area widget). Allows support for behaviors like toggling |
| 69 // auto-hide with an edge swipe, even if that gesture event hits another |
| 70 // window. Returns true if the event was handled. |
| 71 virtual bool ProcessGestureEvent(const ui::GestureEvent& event, |
| 72 WmWindow* target_window) = 0; |
| 73 |
| 67 // TODO(jamescook): Nuke when ash_sysui is removed. http://crbug.com/621112 | 74 // TODO(jamescook): Nuke when ash_sysui is removed. http://crbug.com/621112 |
| 68 virtual void UpdateAutoHideForMouseEvent(ui::MouseEvent* event) = 0; | 75 virtual void UpdateAutoHideForMouseEvent(ui::MouseEvent* event) = 0; |
| 69 virtual void UpdateAutoHideForGestureEvent(ui::GestureEvent* event) = 0; | 76 virtual void UpdateAutoHideForGestureEvent(ui::GestureEvent* event) = 0; |
| 70 | 77 |
| 71 virtual void AddObserver(WmShelfObserver* observer) = 0; | 78 virtual void AddObserver(WmShelfObserver* observer) = 0; |
| 72 virtual void RemoveObserver(WmShelfObserver* observer) = 0; | 79 virtual void RemoveObserver(WmShelfObserver* observer) = 0; |
| 73 | 80 |
| 74 // Simulates a virtual keyboard bounds update. | 81 // Simulates a virtual keyboard bounds update. |
| 75 virtual void SetKeyboardBoundsForTesting(const gfx::Rect& bounds) = 0; | 82 virtual void SetKeyboardBoundsForTesting(const gfx::Rect& bounds) = 0; |
| 76 | 83 |
| 77 protected: | 84 protected: |
| 78 virtual ~WmShelf() {} | 85 virtual ~WmShelf() {} |
| 79 }; | 86 }; |
| 80 | 87 |
| 81 } // namespace ash | 88 } // namespace ash |
| 82 | 89 |
| 83 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ | 90 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ |
| OLD | NEW |