| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 75 |
| 74 // Notifies child trays, and the |status_area_widget_delegate_| to schedule a | 76 // Notifies child trays, and the |status_area_widget_delegate_| to schedule a |
| 75 // paint. | 77 // paint. |
| 76 void SchedulePaint(); | 78 void SchedulePaint(); |
| 77 | 79 |
| 78 // Overridden from views::Widget: | 80 // Overridden from views::Widget: |
| 79 void OnNativeWidgetActivationChanged(bool active) override; | 81 void OnNativeWidgetActivationChanged(bool active) override; |
| 80 void OnMouseEvent(ui::MouseEvent* event) override; | 82 void OnMouseEvent(ui::MouseEvent* event) override; |
| 81 void OnGestureEvent(ui::GestureEvent* event) override; | 83 void OnGestureEvent(ui::GestureEvent* event) override; |
| 82 | 84 |
| 85 // ShelfBackgroundAnimatorObserver: |
| 86 void UpdateShelfItemBackground(int alpha) override; |
| 87 |
| 83 private: | 88 private: |
| 84 void AddSystemTray(); | 89 void AddSystemTray(); |
| 85 void AddWebNotificationTray(); | 90 void AddWebNotificationTray(); |
| 86 #if defined(OS_CHROMEOS) | 91 #if defined(OS_CHROMEOS) |
| 87 void AddLogoutButtonTray(); | 92 void AddLogoutButtonTray(); |
| 88 void AddPaletteTray(); | 93 void AddPaletteTray(); |
| 89 void AddVirtualKeyboardTray(); | 94 void AddVirtualKeyboardTray(); |
| 90 void AddImeMenuTray(); | 95 void AddImeMenuTray(); |
| 91 #endif | 96 #endif |
| 92 void AddOverviewButtonTray(); | 97 void AddOverviewButtonTray(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 105 LoginStatus login_status_; | 110 LoginStatus login_status_; |
| 106 | 111 |
| 107 WmShelf* wm_shelf_; | 112 WmShelf* wm_shelf_; |
| 108 | 113 |
| 109 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); | 114 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); |
| 110 }; | 115 }; |
| 111 | 116 |
| 112 } // namespace ash | 117 } // namespace ash |
| 113 | 118 |
| 114 #endif // ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_H_ | 119 #endif // ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_H_ |
| OLD | NEW |