OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_WM_AURA_WM_SHELF_AURA_H_ |
| 6 #define ASH_WM_AURA_WM_SHELF_AURA_H_ |
| 7 |
| 8 #include "ash/ash_export.h" |
| 9 #include "ash/shelf/shelf_layout_manager_observer.h" |
| 10 #include "ash/wm/common/shelf/wm_shelf.h" |
| 11 #include "base/macros.h" |
| 12 #include "base/observer_list.h" |
| 13 |
| 14 namespace ash { |
| 15 |
| 16 class Shelf; |
| 17 class ShelfLayoutManager; |
| 18 |
| 19 namespace wm { |
| 20 |
| 21 // Aura implementation of WmShelf. |
| 22 class ASH_EXPORT WmShelfAura : public WmShelf, |
| 23 public ShelfLayoutManagerObserver { |
| 24 public: |
| 25 explicit WmShelfAura(Shelf* shelf); |
| 26 ~WmShelfAura() override; |
| 27 |
| 28 private: |
| 29 // WmShelf: |
| 30 WmWindow* GetWindow() override; |
| 31 ShelfAlignment GetAlignment() override; |
| 32 ShelfBackgroundType GetBackgroundType() override; |
| 33 void UpdateVisibilityState() override; |
| 34 void AddObserver(WmShelfObserver* observer) override; |
| 35 void RemoveObserver(WmShelfObserver* observer) override; |
| 36 |
| 37 // ShelfLayoutManagerObserver: |
| 38 void WillDeleteShelf() override; |
| 39 void OnBackgroundUpdated(wm::ShelfBackgroundType background_type, |
| 40 BackgroundAnimatorChangeType change_type) override; |
| 41 |
| 42 Shelf* shelf_; |
| 43 base::ObserverList<WmShelfObserver> observers_; |
| 44 // ShelfLayoutManager is cached separately as it may be destroyed before |
| 45 // WmShelfAura. |
| 46 ShelfLayoutManager* shelf_layout_manager_; |
| 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(WmShelfAura); |
| 49 }; |
| 50 |
| 51 } // namespace wm |
| 52 } // namespace ash |
| 53 |
| 54 #endif // ASH_WM_AURA_WM_SHELF_AURA_H_ |
OLD | NEW |