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