Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: ash/common/shelf/shelf_widget.h

Issue 2679333002: [ash-md] Remove the number of animators used for the Shelf animations. (Closed)
Patch Set: Addressed comments from patch set 4. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/shelf/shelf_layout_manager_observer.h ('k') | ash/common/shelf/shelf_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_COMMON_SHELF_SHELF_WIDGET_H_ 5 #ifndef ASH_COMMON_SHELF_SHELF_WIDGET_H_
6 #define ASH_COMMON_SHELF_SHELF_WIDGET_H_ 6 #define ASH_COMMON_SHELF_SHELF_WIDGET_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/common/shelf/shelf_background_animator.h" 11 #include "ash/common/shelf/shelf_background_animator.h"
12 #include "ash/common/shelf/shelf_background_animator_observer.h" 12 #include "ash/common/shelf/shelf_background_animator_observer.h"
13 #include "ash/common/shelf/shelf_layout_manager_observer.h" 13 #include "ash/common/shelf/shelf_layout_manager_observer.h"
14 #include "ash/public/cpp/shelf_types.h" 14 #include "ash/public/cpp/shelf_types.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "ui/views/widget/widget.h" 16 #include "ui/views/widget/widget.h"
17 #include "ui/views/widget/widget_observer.h" 17 #include "ui/views/widget/widget_observer.h"
18 18
19 namespace app_list { 19 namespace app_list {
20 class ApplicationDragAndDropHost; 20 class ApplicationDragAndDropHost;
21 } 21 }
22 22
23 namespace ash { 23 namespace ash {
24 enum class AnimationChangeType;
24 class AppListButton; 25 class AppListButton;
25 class FocusCycler; 26 class FocusCycler;
26 class ShelfLayoutManager; 27 class ShelfLayoutManager;
27 class ShelfView; 28 class ShelfView;
28 class StatusAreaWidget; 29 class StatusAreaWidget;
29 class WmShelf; 30 class WmShelf;
30 class WmWindow; 31 class WmWindow;
31 32
32 // The ShelfWidget manages the shelf view (which contains the shelf icons) and 33 // The ShelfWidget manages the shelf view (which contains the shelf icons) and
33 // the status area widget. There is one ShelfWidget per display. It is created 34 // the status area widget. There is one ShelfWidget per display. It is created
34 // early during RootWindowController initialization. 35 // early during RootWindowController initialization.
35 class ASH_EXPORT ShelfWidget : public views::Widget, 36 class ASH_EXPORT ShelfWidget : public views::Widget,
36 public views::WidgetObserver, 37 public views::WidgetObserver,
37 public ShelfBackgroundAnimatorObserver, 38 public ShelfBackgroundAnimatorObserver,
38 public ShelfLayoutManagerObserver { 39 public ShelfLayoutManagerObserver {
39 public: 40 public:
40 ShelfWidget(WmWindow* shelf_container, WmShelf* wm_shelf); 41 ShelfWidget(WmWindow* shelf_container, WmShelf* wm_shelf);
41 ~ShelfWidget() override; 42 ~ShelfWidget() override;
42 43
43 void CreateStatusAreaWidget(WmWindow* status_container); 44 void CreateStatusAreaWidget(WmWindow* status_container);
44 45
45 void OnShelfAlignmentChanged(); 46 void OnShelfAlignmentChanged();
46 47
47 // Sets the shelf's background type. 48 // Sets the shelf's background type.
48 void SetPaintsBackground(ShelfBackgroundType background_type, 49 void SetPaintsBackground(ShelfBackgroundType background_type,
49 BackgroundAnimatorChangeType change_type); 50 AnimationChangeType change_type);
50 ShelfBackgroundType GetBackgroundType() const; 51 ShelfBackgroundType GetBackgroundType() const;
51 52
52 // Hide the shelf behind a black bar during e.g. a user transition when |hide| 53 // Hide the shelf behind a black bar during e.g. a user transition when |hide|
53 // is true. The |animation_time_ms| will be used as animation duration. 54 // is true. The |animation_time_ms| will be used as animation duration.
54 void HideShelfBehindBlackBar(bool hide, int animation_time_ms); 55 void HideShelfBehindBlackBar(bool hide, int animation_time_ms);
55 bool IsShelfHiddenBehindBlackBar() const; 56 bool IsShelfHiddenBehindBlackBar() const;
56 57
57 ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; } 58 ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; }
58 StatusAreaWidget* status_area_widget() const { return status_area_widget_; } 59 StatusAreaWidget* status_area_widget() const { return status_area_widget_; }
59 60
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 ShelfView* shelf_view_; 121 ShelfView* shelf_view_;
121 ShelfBackgroundAnimator background_animator_; 122 ShelfBackgroundAnimator background_animator_;
122 bool activating_as_fallback_; 123 bool activating_as_fallback_;
123 124
124 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); 125 DISALLOW_COPY_AND_ASSIGN(ShelfWidget);
125 }; 126 };
126 127
127 } // namespace ash 128 } // namespace ash
128 129
129 #endif // ASH_COMMON_SHELF_SHELF_WIDGET_H_ 130 #endif // ASH_COMMON_SHELF_SHELF_WIDGET_H_
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_layout_manager_observer.h ('k') | ash/common/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698