Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SHELF_SHELF_LAYOUT_MANAGER_OBSERVER_H_ | 5 #ifndef ASH_SHELF_SHELF_LAYOUT_MANAGER_OBSERVER_H_ |
| 6 #define ASH_SHELF_SHELF_LAYOUT_MANAGER_OBSERVER_H_ | 6 #define ASH_SHELF_SHELF_LAYOUT_MANAGER_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/shelf/shelf_types.h" | 9 #include "ash/shelf/shelf_types.h" |
| 10 #include "ash/wm/common/background_animator.h" | 10 #include "ash/wm/common/background_animator.h" |
| 11 | 11 |
| 12 namespace aura { | 12 namespace aura { |
| 13 class Window; | 13 class Window; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace ash { | 16 namespace ash { |
| 17 | 17 |
| 18 class ShelfLayoutManager; | |
| 19 | |
| 18 class ASH_EXPORT ShelfLayoutManagerObserver { | 20 class ASH_EXPORT ShelfLayoutManagerObserver { |
| 19 public: | 21 public: |
| 20 virtual ~ShelfLayoutManagerObserver() {} | 22 virtual ~ShelfLayoutManagerObserver() {} |
| 21 | 23 |
| 22 // Called when the target ShelfLayoutManager will be deleted. | 24 // Called when the target ShelfLayoutManager will be deleted. |
| 23 virtual void WillDeleteShelf() {} | 25 virtual void WillDeleteShelf() {} |
| 24 | 26 |
| 25 // Called when the visibility change is scheduled. | 27 // Called when the visibility change is scheduled. |
| 26 virtual void WillChangeVisibilityState(ShelfVisibilityState new_state) {} | 28 virtual void WillChangeVisibilityState(ShelfVisibilityState new_state) {} |
| 27 | 29 |
| 30 // Called when the visibility change is committed. | |
| 31 virtual void DidChangeVisibilityState(ShelfLayoutManager* layout_manager, | |
|
msw
2016/05/24 20:46:55
optional nit: pass the ash::Shelf instead? ditto b
James Cook
2016/05/25 00:25:43
I moved this method to the delegate and removed th
| |
| 32 ShelfVisibilityState new_state) {} | |
| 33 | |
| 28 // Called when the auto hide state is changed. | 34 // Called when the auto hide state is changed. |
| 29 virtual void OnAutoHideStateChanged(ShelfAutoHideState new_state) {} | 35 virtual void OnAutoHideStateChanged(ShelfLayoutManager* layout_manager, |
| 36 ShelfAutoHideState new_state) {} | |
| 30 | 37 |
| 31 // Called when shelf background animation is started. | 38 // Called when shelf background animation is started. |
| 32 virtual void OnBackgroundUpdated(wm::ShelfBackgroundType background_type, | 39 virtual void OnBackgroundUpdated(wm::ShelfBackgroundType background_type, |
| 33 BackgroundAnimatorChangeType change_type) {} | 40 BackgroundAnimatorChangeType change_type) {} |
| 34 }; | 41 }; |
| 35 | 42 |
| 36 } // namespace ash | 43 } // namespace ash |
| 37 | 44 |
| 38 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_OBSERVER_H_ | 45 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_OBSERVER_H_ |
| OLD | NEW |