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

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

Issue 2191153002: Revert of Replaced BackgroundAnimator with ShelfBackgroundAnimator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/shelf/shelf_view_unittest.cc ('k') | ash/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_SHELF_SHELF_WIDGET_H_ 5 #ifndef ASH_SHELF_SHELF_WIDGET_H_
6 #define ASH_SHELF_SHELF_WIDGET_H_ 6 #define ASH_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"
12 #include "ash/common/shelf/shelf_types.h" 11 #include "ash/common/shelf/shelf_types.h"
12 #include "ash/common/wm/background_animator.h"
13 #include "ash/shelf/shelf_layout_manager_observer.h" 13 #include "ash/shelf/shelf_layout_manager_observer.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "ui/views/widget/widget.h" 15 #include "ui/views/widget/widget.h"
16 #include "ui/views/widget/widget_observer.h" 16 #include "ui/views/widget/widget_observer.h"
17 17
18 namespace ash { 18 namespace ash {
19 class FocusCycler; 19 class FocusCycler;
20 class Shelf; 20 class Shelf;
21 class ShelfLayoutManager; 21 class ShelfLayoutManager;
22 class StatusAreaWidget; 22 class StatusAreaWidget;
(...skipping 29 matching lines...) Expand all
52 bool IsShelfHiddenBehindBlackBar() const; 52 bool IsShelfHiddenBehindBlackBar() const;
53 53
54 // Causes shelf items to be slightly dimmed (e.g. when a window is maximized). 54 // Causes shelf items to be slightly dimmed (e.g. when a window is maximized).
55 void SetDimsShelf(bool dimming); 55 void SetDimsShelf(bool dimming);
56 bool GetDimsShelf() const; 56 bool GetDimsShelf() const;
57 57
58 ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; } 58 ShelfLayoutManager* shelf_layout_manager() { return shelf_layout_manager_; }
59 Shelf* shelf() const { return shelf_.get(); } 59 Shelf* shelf() const { return shelf_.get(); }
60 StatusAreaWidget* status_area_widget() const { return status_area_widget_; } 60 StatusAreaWidget* status_area_widget() const { return status_area_widget_; }
61 61
62 void CreateShelf(); 62 void CreateShelf(WmShelfAura* wm_shelf_aura);
63 void PostCreateShelf(); 63 void PostCreateShelf();
64 64
65 // Set visibility of the shelf. 65 // Set visibility of the shelf.
66 void SetShelfVisibility(bool visible); 66 void SetShelfVisibility(bool visible);
67 bool IsShelfVisible() const; 67 bool IsShelfVisible() const;
68 68
69 // Sets the focus cycler. Also adds the shelf to the cycle. 69 // Sets the focus cycler. Also adds the shelf to the cycle.
70 void SetFocusCycler(FocusCycler* focus_cycler); 70 void SetFocusCycler(FocusCycler* focus_cycler);
71 FocusCycler* GetFocusCycler(); 71 FocusCycler* GetFocusCycler();
72 72
(...skipping 24 matching lines...) Expand all
97 // ShelfLayoutManagerObserver overrides: 97 // ShelfLayoutManagerObserver overrides:
98 void WillDeleteShelfLayoutManager() override; 98 void WillDeleteShelfLayoutManager() override;
99 99
100 private: 100 private:
101 class DelegateView; 101 class DelegateView;
102 102
103 // views::Widget: 103 // views::Widget:
104 void OnMouseEvent(ui::MouseEvent* event) override; 104 void OnMouseEvent(ui::MouseEvent* event) override;
105 void OnGestureEvent(ui::GestureEvent* event) override; 105 void OnGestureEvent(ui::GestureEvent* event) override;
106 106
107 WmShelfAura* wm_shelf_aura_;
108
109 // Owned by the shelf container's aura::Window. 107 // Owned by the shelf container's aura::Window.
110 ShelfLayoutManager* shelf_layout_manager_; 108 ShelfLayoutManager* shelf_layout_manager_;
111 std::unique_ptr<Shelf> shelf_; 109 std::unique_ptr<Shelf> shelf_;
112 StatusAreaWidget* status_area_widget_; 110 StatusAreaWidget* status_area_widget_;
113 111
114 // |delegate_view_| is the contents view of this widget and is cleaned up 112 // |delegate_view_| is the contents view of this widget and is cleaned up
115 // during CloseChildWindows of the associated RootWindowController. 113 // during CloseChildWindows of the associated RootWindowController.
116 DelegateView* delegate_view_; 114 DelegateView* delegate_view_;
117 ShelfBackgroundAnimator background_animator_; 115 BackgroundAnimator background_animator_;
118 bool activating_as_fallback_; 116 bool activating_as_fallback_;
119 117
120 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); 118 DISALLOW_COPY_AND_ASSIGN(ShelfWidget);
121 }; 119 };
122 120
123 } // namespace ash 121 } // namespace ash
124 122
125 #endif // ASH_SHELF_SHELF_WIDGET_H_ 123 #endif // ASH_SHELF_SHELF_WIDGET_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698