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

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

Issue 2288993002: ash: Move AppList support to ShelfWidget, expose ShelfWidget in WmShelf (Closed)
Patch Set: Created 4 years, 3 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
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/common/shelf/shelf_types.h" 14 #include "ash/common/shelf/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 {
20 class ApplicationDragAndDropHost;
21 }
22
19 namespace ash { 23 namespace ash {
24 class AppListButton;
20 class FocusCycler; 25 class FocusCycler;
21 class Shelf; 26 class Shelf;
22 class ShelfLayoutManager; 27 class ShelfLayoutManager;
23 class ShelfView; 28 class ShelfView;
24 class StatusAreaWidget; 29 class StatusAreaWidget;
25 class WmShelf; 30 class WmShelf;
26 class WmWindow; 31 class WmWindow;
27 32
28 class ASH_EXPORT ShelfWidget : public views::Widget, 33 class ASH_EXPORT ShelfWidget : public views::Widget,
29 public views::WidgetObserver, 34 public views::WidgetObserver,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 94
90 // Force the shelf to be presented in an undimmed state. 95 // Force the shelf to be presented in an undimmed state.
91 void ForceUndimming(bool force); 96 void ForceUndimming(bool force);
92 97
93 // See WmShelf::UpdateIconPositionForPanel(). 98 // See WmShelf::UpdateIconPositionForPanel().
94 void UpdateIconPositionForPanel(WmWindow* panel); 99 void UpdateIconPositionForPanel(WmWindow* panel);
95 100
96 // See WmShelf::GetScreenBoundsOfItemIconForWindow(). 101 // See WmShelf::GetScreenBoundsOfItemIconForWindow().
97 gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window); 102 gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window);
98 103
104 // Returns the button that opens the app launcher.
105 AppListButton* GetAppListButton() const;
106
107 // Returns ApplicationDragAndDropHost for this shelf.
msw 2016/08/29 22:58:08 nit: 'Returns the'
James Cook 2016/08/29 23:49:25 Done.
108 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList();
109
99 // Overridden from views::WidgetObserver: 110 // Overridden from views::WidgetObserver:
100 void OnWidgetActivationChanged(views::Widget* widget, bool active) override; 111 void OnWidgetActivationChanged(views::Widget* widget, bool active) override;
101 112
102 // A function to test the current alpha used by the dimming bar. If there is 113 // A function to test the current alpha used by the dimming bar. If there is
103 // no dimmer active, the function will return -1. 114 // no dimmer active, the function will return -1.
104 int GetDimmingAlphaForTest(); 115 int GetDimmingAlphaForTest();
105 116
106 // A function to test the bounds of the dimming bar. Returns gfx::Rect() if 117 // A function to test the bounds of the dimming bar. Returns gfx::Rect() if
107 // the dimmer is inactive. 118 // the dimmer is inactive.
108 gfx::Rect GetDimmerBoundsForTest(); 119 gfx::Rect GetDimmerBoundsForTest();
(...skipping 26 matching lines...) Expand all
135 ShelfView* shelf_view_; 146 ShelfView* shelf_view_;
136 ShelfBackgroundAnimator background_animator_; 147 ShelfBackgroundAnimator background_animator_;
137 bool activating_as_fallback_; 148 bool activating_as_fallback_;
138 149
139 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); 150 DISALLOW_COPY_AND_ASSIGN(ShelfWidget);
140 }; 151 };
141 152
142 } // namespace ash 153 } // namespace ash
143 154
144 #endif // ASH_COMMON_SHELF_SHELF_WIDGET_H_ 155 #endif // ASH_COMMON_SHELF_SHELF_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698