| 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_MUS_BRIDGE_WM_SHELF_MUS_H_ | 5 #ifndef ASH_MUS_BRIDGE_WM_SHELF_MUS_H_ |
| 6 #define ASH_MUS_BRIDGE_WM_SHELF_MUS_H_ | 6 #define ASH_MUS_BRIDGE_WM_SHELF_MUS_H_ |
| 7 | 7 |
| 8 #include "ash/common/shelf/wm_shelf.h" | 8 #include "ash/common/shelf/wm_shelf.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/observer_list.h" | |
| 11 | |
| 12 namespace views { | |
| 13 class Widget; | |
| 14 } | |
| 15 | 10 |
| 16 namespace ash { | 11 namespace ash { |
| 12 |
| 13 class Shelf; |
| 14 class ShelfWidget; |
| 17 class WmRootWindowController; | 15 class WmRootWindowController; |
| 18 | 16 |
| 19 namespace mus { | 17 namespace mus { |
| 20 | 18 |
| 21 // WmShelf implementation for mus. | 19 // WmShelf implementation for mus. |
| 22 class WmShelfMus : public WmShelf { | 20 class WmShelfMus : public WmShelf { |
| 23 public: | 21 public: |
| 24 WmShelfMus(WmRootWindowController* root_window_controller); | 22 WmShelfMus(WmRootWindowController* root_window_controller); |
| 25 ~WmShelfMus() override; | 23 ~WmShelfMus() override; |
| 26 | 24 |
| 27 // WmShelf: | 25 // WmShelf: |
| 28 WmWindow* GetWindow() override; | 26 void WillDeleteShelfLayoutManager() override; |
| 29 ShelfAlignment GetAlignment() const override; | |
| 30 void SetAlignment(ShelfAlignment alignment) override; | |
| 31 ShelfAutoHideBehavior GetAutoHideBehavior() const override; | |
| 32 void SetAutoHideBehavior(ShelfAutoHideBehavior behavior) override; | |
| 33 ShelfAutoHideState GetAutoHideState() const override; | |
| 34 void UpdateAutoHideState() override; | |
| 35 ShelfBackgroundType GetBackgroundType() const override; | |
| 36 WmDimmerView* CreateDimmerView(bool disable_animations_for_test) override; | |
| 37 bool IsDimmed() const override; | |
| 38 void SchedulePaint() override; | |
| 39 bool IsVisible() const override; | |
| 40 void UpdateVisibilityState() override; | |
| 41 ShelfVisibilityState GetVisibilityState() const override; | |
| 42 gfx::Rect GetIdealBounds() override; | |
| 43 gfx::Rect GetUserWorkAreaBounds() const override; | |
| 44 void UpdateIconPositionForWindow(WmWindow* window) override; | |
| 45 gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window) override; | |
| 46 bool ProcessGestureEvent(const ui::GestureEvent& event) override; | |
| 47 void AddObserver(WmShelfObserver* observer) override; | |
| 48 void RemoveObserver(WmShelfObserver* observer) override; | |
| 49 void SetKeyboardBoundsForTesting(const gfx::Rect& bounds) override; | |
| 50 ShelfLockingManager* GetShelfLockingManagerForTesting() override; | |
| 51 ShelfView* GetShelfViewForTesting() override; | |
| 52 | 27 |
| 53 private: | 28 private: |
| 54 base::ObserverList<WmShelfObserver> observers_; | 29 // Legacy shelf controller. Only present after shelf is created (post-login). |
| 30 std::unique_ptr<Shelf> shelf_; |
| 55 | 31 |
| 56 // Owned by native widget. | 32 // The shelf widget for this shelf. |
| 57 views::Widget* shelf_widget_; | 33 std::unique_ptr<ShelfWidget> shelf_widget_; |
| 58 | 34 |
| 59 DISALLOW_COPY_AND_ASSIGN(WmShelfMus); | 35 DISALLOW_COPY_AND_ASSIGN(WmShelfMus); |
| 60 }; | 36 }; |
| 61 | 37 |
| 62 } // namespace mus | 38 } // namespace mus |
| 63 } // namespace ash | 39 } // namespace ash |
| 64 | 40 |
| 65 #endif // ASH_MUS_BRIDGE_WM_SHELF_MUS_H_ | 41 #endif // ASH_MUS_BRIDGE_WM_SHELF_MUS_H_ |
| OLD | NEW |