OLD | NEW |
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_SYSTEM_STATUS_AREA_WIDGET_H_ | 5 #ifndef ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_H_ |
6 #define ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_H_ | 6 #define ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/common/login_status.h" | 9 #include "ash/common/login_status.h" |
| 10 #include "ash/common/shelf/shelf_background_animator_observer.h" |
10 #include "ash/common/shelf/shelf_types.h" | 11 #include "ash/common/shelf/shelf_types.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "ui/views/widget/widget.h" | 13 #include "ui/views/widget/widget.h" |
13 | 14 |
14 namespace ash { | 15 namespace ash { |
15 class OverviewButtonTray; | 16 class OverviewButtonTray; |
16 class ShellDelegate; | 17 class ShellDelegate; |
17 class StatusAreaWidgetDelegate; | 18 class StatusAreaWidgetDelegate; |
18 class SystemTray; | 19 class SystemTray; |
19 class WebNotificationTray; | 20 class WebNotificationTray; |
20 class WmShelf; | 21 class WmShelf; |
21 class WmWindow; | 22 class WmWindow; |
22 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
23 class ImeMenuTray; | 24 class ImeMenuTray; |
24 class LogoutButtonTray; | 25 class LogoutButtonTray; |
25 class PaletteTray; | 26 class PaletteTray; |
26 class VirtualKeyboardTray; | 27 class VirtualKeyboardTray; |
27 #endif | 28 #endif |
28 | 29 |
29 class ASH_EXPORT StatusAreaWidget : public views::Widget { | 30 class ASH_EXPORT StatusAreaWidget : public views::Widget, |
| 31 public ShelfBackgroundAnimatorObserver { |
30 public: | 32 public: |
31 StatusAreaWidget(WmWindow* status_container, WmShelf* wm_shelf); | 33 StatusAreaWidget(WmWindow* status_container, WmShelf* wm_shelf); |
32 ~StatusAreaWidget() override; | 34 ~StatusAreaWidget() override; |
33 | 35 |
34 // Creates the SystemTray, WebNotificationTray and LogoutButtonTray. | 36 // Creates the SystemTray, WebNotificationTray and LogoutButtonTray. |
35 void CreateTrayViews(); | 37 void CreateTrayViews(); |
36 | 38 |
37 // Destroys the system tray and web notification tray. Called before | 39 // Destroys the system tray and web notification tray. Called before |
38 // tearing down the windows to avoid shutdown ordering issues. | 40 // tearing down the windows to avoid shutdown ordering issues. |
39 void Shutdown(); | 41 void Shutdown(); |
(...skipping 28 matching lines...) Expand all Loading... |
68 | 70 |
69 // Notifies child trays, and the |status_area_widget_delegate_| to schedule a | 71 // Notifies child trays, and the |status_area_widget_delegate_| to schedule a |
70 // paint. | 72 // paint. |
71 void SchedulePaint(); | 73 void SchedulePaint(); |
72 | 74 |
73 // Overridden from views::Widget: | 75 // Overridden from views::Widget: |
74 void OnNativeWidgetActivationChanged(bool active) override; | 76 void OnNativeWidgetActivationChanged(bool active) override; |
75 void OnMouseEvent(ui::MouseEvent* event) override; | 77 void OnMouseEvent(ui::MouseEvent* event) override; |
76 void OnGestureEvent(ui::GestureEvent* event) override; | 78 void OnGestureEvent(ui::GestureEvent* event) override; |
77 | 79 |
| 80 // ShelfBackgroundAnimatorObserver: |
| 81 void UpdateShelfItemBackground(int alpha) override; |
| 82 |
78 private: | 83 private: |
79 void AddSystemTray(); | 84 void AddSystemTray(); |
80 void AddWebNotificationTray(); | 85 void AddWebNotificationTray(); |
81 #if defined(OS_CHROMEOS) | 86 #if defined(OS_CHROMEOS) |
82 void AddLogoutButtonTray(); | 87 void AddLogoutButtonTray(); |
83 void AddPaletteTray(); | 88 void AddPaletteTray(); |
84 void AddVirtualKeyboardTray(); | 89 void AddVirtualKeyboardTray(); |
85 void AddImeMenuTray(); | 90 void AddImeMenuTray(); |
86 #endif | 91 #endif |
87 void AddOverviewButtonTray(); | 92 void AddOverviewButtonTray(); |
(...skipping 12 matching lines...) Expand all Loading... |
100 LoginStatus login_status_; | 105 LoginStatus login_status_; |
101 | 106 |
102 WmShelf* wm_shelf_; | 107 WmShelf* wm_shelf_; |
103 | 108 |
104 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); | 109 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); |
105 }; | 110 }; |
106 | 111 |
107 } // namespace ash | 112 } // namespace ash |
108 | 113 |
109 #endif // ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_H_ | 114 #endif // ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_H_ |
OLD | NEW |