| 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_AURA_WM_SHELF_AURA_H_ | 5 #ifndef ASH_WM_AURA_WM_SHELF_AURA_H_ |
| 6 #define ASH_WM_AURA_WM_SHELF_AURA_H_ | 6 #define ASH_WM_AURA_WM_SHELF_AURA_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/shelf/shelf_icon_observer.h" |
| 9 #include "ash/shelf/shelf_layout_manager_observer.h" | 10 #include "ash/shelf/shelf_layout_manager_observer.h" |
| 10 #include "ash/wm/common/shelf/wm_shelf.h" | 11 #include "ash/wm/common/shelf/wm_shelf.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 13 | 14 |
| 14 namespace ash { | 15 namespace ash { |
| 15 | 16 |
| 16 class Shelf; | 17 class Shelf; |
| 17 class ShelfLayoutManager; | 18 class ShelfLayoutManager; |
| 18 | 19 |
| 19 namespace wm { | 20 namespace wm { |
| 20 | 21 |
| 21 // Aura implementation of WmShelf. | 22 // Aura implementation of WmShelf. |
| 22 class ASH_EXPORT WmShelfAura : public WmShelf, | 23 class ASH_EXPORT WmShelfAura : public WmShelf, |
| 23 public ShelfLayoutManagerObserver { | 24 public ShelfLayoutManagerObserver, |
| 25 public ShelfIconObserver { |
| 24 public: | 26 public: |
| 25 explicit WmShelfAura(Shelf* shelf); | 27 explicit WmShelfAura(Shelf* shelf); |
| 26 ~WmShelfAura() override; | 28 ~WmShelfAura() override; |
| 27 | 29 |
| 30 static Shelf* GetShelf(WmShelf* shelf); |
| 31 |
| 28 private: | 32 private: |
| 29 // WmShelf: | 33 // WmShelf: |
| 30 WmWindow* GetWindow() override; | 34 WmWindow* GetWindow() override; |
| 31 ShelfAlignment GetAlignment() override; | 35 ShelfAlignment GetAlignment() const override; |
| 32 ShelfBackgroundType GetBackgroundType() override; | 36 ShelfBackgroundType GetBackgroundType() const override; |
| 33 void UpdateVisibilityState() override; | 37 void UpdateVisibilityState() override; |
| 38 ShelfVisibilityState GetVisibilityState() const override; |
| 39 void UpdateIconPositionForWindow(WmWindow* window) override; |
| 40 gfx::Rect GetScreenBoundsOfItemIconForWindow(wm::WmWindow* window) override; |
| 34 void AddObserver(WmShelfObserver* observer) override; | 41 void AddObserver(WmShelfObserver* observer) override; |
| 35 void RemoveObserver(WmShelfObserver* observer) override; | 42 void RemoveObserver(WmShelfObserver* observer) override; |
| 36 | 43 |
| 37 // ShelfLayoutManagerObserver: | 44 // ShelfLayoutManagerObserver: |
| 38 void WillDeleteShelf() override; | 45 void WillDeleteShelf() override; |
| 39 void OnBackgroundUpdated(wm::ShelfBackgroundType background_type, | 46 void OnBackgroundUpdated(wm::ShelfBackgroundType background_type, |
| 40 BackgroundAnimatorChangeType change_type) override; | 47 BackgroundAnimatorChangeType change_type) override; |
| 48 void WillChangeVisibilityState(ShelfVisibilityState new_state) override; |
| 49 |
| 50 // ShelfIconObserver: |
| 51 void OnShelfIconPositionsChanged() override; |
| 41 | 52 |
| 42 Shelf* shelf_; | 53 Shelf* shelf_; |
| 43 base::ObserverList<WmShelfObserver> observers_; | 54 base::ObserverList<WmShelfObserver> observers_; |
| 44 // ShelfLayoutManager is cached separately as it may be destroyed before | 55 // ShelfLayoutManager is cached separately as it may be destroyed before |
| 45 // WmShelfAura. | 56 // WmShelfAura. |
| 46 ShelfLayoutManager* shelf_layout_manager_; | 57 ShelfLayoutManager* shelf_layout_manager_; |
| 47 | 58 |
| 48 DISALLOW_COPY_AND_ASSIGN(WmShelfAura); | 59 DISALLOW_COPY_AND_ASSIGN(WmShelfAura); |
| 49 }; | 60 }; |
| 50 | 61 |
| 51 } // namespace wm | 62 } // namespace wm |
| 52 } // namespace ash | 63 } // namespace ash |
| 53 | 64 |
| 54 #endif // ASH_WM_AURA_WM_SHELF_AURA_H_ | 65 #endif // ASH_WM_AURA_WM_SHELF_AURA_H_ |
| OLD | NEW |