| 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_AURA_WM_SHELF_AURA_H_ | 5 #ifndef ASH_AURA_WM_SHELF_AURA_H_ |
| 6 #define ASH_AURA_WM_SHELF_AURA_H_ | 6 #define ASH_AURA_WM_SHELF_AURA_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/shelf/wm_shelf.h" | 9 #include "ash/common/shelf/wm_shelf.h" |
| 10 #include "ash/shelf/shelf_icon_observer.h" | 10 #include "ash/shelf/shelf_icon_observer.h" |
| 11 #include "ash/shelf/shelf_layout_manager_observer.h" | 11 #include "ash/shelf/shelf_layout_manager_observer.h" |
| 12 #include "ash/wm/gestures/shelf_gesture_handler.h" |
| 12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 13 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 14 | 15 |
| 15 namespace ash { | 16 namespace ash { |
| 16 | 17 |
| 17 class Shelf; | 18 class Shelf; |
| 18 class ShelfLayoutManager; | 19 class ShelfLayoutManager; |
| 19 | 20 |
| 20 // Aura implementation of WmShelf. | 21 // Aura implementation of WmShelf. |
| 21 class ASH_EXPORT WmShelfAura : public WmShelf, | 22 class ASH_EXPORT WmShelfAura : public WmShelf, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 47 void UpdateAutoHideState() override; | 48 void UpdateAutoHideState() override; |
| 48 ShelfBackgroundType GetBackgroundType() const override; | 49 ShelfBackgroundType GetBackgroundType() const override; |
| 49 bool IsDimmed() const override; | 50 bool IsDimmed() const override; |
| 50 bool IsVisible() const override; | 51 bool IsVisible() const override; |
| 51 void UpdateVisibilityState() override; | 52 void UpdateVisibilityState() override; |
| 52 ShelfVisibilityState GetVisibilityState() const override; | 53 ShelfVisibilityState GetVisibilityState() const override; |
| 53 gfx::Rect GetIdealBounds() override; | 54 gfx::Rect GetIdealBounds() override; |
| 54 gfx::Rect GetUserWorkAreaBounds() const override; | 55 gfx::Rect GetUserWorkAreaBounds() const override; |
| 55 void UpdateIconPositionForWindow(WmWindow* window) override; | 56 void UpdateIconPositionForWindow(WmWindow* window) override; |
| 56 gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window) override; | 57 gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window) override; |
| 58 bool ProcessGestureEvent(const ui::GestureEvent& event, |
| 59 WmWindow* target_window) override; |
| 57 void UpdateAutoHideForMouseEvent(ui::MouseEvent* event) override; | 60 void UpdateAutoHideForMouseEvent(ui::MouseEvent* event) override; |
| 58 void UpdateAutoHideForGestureEvent(ui::GestureEvent* event) override; | 61 void UpdateAutoHideForGestureEvent(ui::GestureEvent* event) override; |
| 59 void AddObserver(WmShelfObserver* observer) override; | 62 void AddObserver(WmShelfObserver* observer) override; |
| 60 void RemoveObserver(WmShelfObserver* observer) override; | 63 void RemoveObserver(WmShelfObserver* observer) override; |
| 61 void SetKeyboardBoundsForTesting(const gfx::Rect& bounds) override; | 64 void SetKeyboardBoundsForTesting(const gfx::Rect& bounds) override; |
| 62 | 65 |
| 63 // ShelfLayoutManagerObserver: | 66 // ShelfLayoutManagerObserver: |
| 64 void WillDeleteShelfLayoutManager() override; | 67 void WillDeleteShelfLayoutManager() override; |
| 65 void OnAutoHideStateChanged(ShelfAutoHideState new_state) override; | 68 void OnAutoHideStateChanged(ShelfAutoHideState new_state) override; |
| 66 void OnBackgroundUpdated(ShelfBackgroundType background_type, | 69 void OnBackgroundUpdated(ShelfBackgroundType background_type, |
| 67 BackgroundAnimatorChangeType change_type) override; | 70 BackgroundAnimatorChangeType change_type) override; |
| 68 void WillChangeVisibilityState(ShelfVisibilityState new_state) override; | 71 void WillChangeVisibilityState(ShelfVisibilityState new_state) override; |
| 69 | 72 |
| 70 // ShelfIconObserver: | 73 // ShelfIconObserver: |
| 71 void OnShelfIconPositionsChanged() override; | 74 void OnShelfIconPositionsChanged() override; |
| 72 | 75 |
| 73 // May be null during login and during initialization of a secondary display. | 76 // May be null during login and during initialization of a secondary display. |
| 74 Shelf* shelf_ = nullptr; | 77 Shelf* shelf_ = nullptr; |
| 75 | 78 |
| 76 // Cached separately because it may be destroyed before |shelf_|. | 79 // Cached separately because it may be destroyed before |shelf_|. |
| 77 ShelfLayoutManager* shelf_layout_manager_ = nullptr; | 80 ShelfLayoutManager* shelf_layout_manager_ = nullptr; |
| 78 | 81 |
| 82 // Handler for swipe and drag gestures. |
| 83 ShelfGestureHandler gesture_handler_; |
| 84 |
| 79 base::ObserverList<WmShelfObserver> observers_; | 85 base::ObserverList<WmShelfObserver> observers_; |
| 80 | 86 |
| 81 DISALLOW_COPY_AND_ASSIGN(WmShelfAura); | 87 DISALLOW_COPY_AND_ASSIGN(WmShelfAura); |
| 82 }; | 88 }; |
| 83 | 89 |
| 84 } // namespace ash | 90 } // namespace ash |
| 85 | 91 |
| 86 #endif // ASH_AURA_WM_SHELF_AURA_H_ | 92 #endif // ASH_AURA_WM_SHELF_AURA_H_ |
| OLD | NEW |