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

Side by Side Diff: ash/system/status_area_widget.h

Issue 1996563002: Add ImeMenuTray element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Activates window when clicked. Created 4 years, 5 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_SYSTEM_STATUS_AREA_WIDGET_H_ 5 #ifndef ASH_SYSTEM_STATUS_AREA_WIDGET_H_
6 #define ASH_SYSTEM_STATUS_AREA_WIDGET_H_ 6 #define ASH_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_types.h" 10 #include "ash/common/shelf/shelf_types.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "ui/views/widget/widget.h" 12 #include "ui/views/widget/widget.h"
13 13
14 namespace ash { 14 namespace ash {
15 class OverviewButtonTray; 15 class OverviewButtonTray;
16 class ShellDelegate; 16 class ShellDelegate;
17 class StatusAreaWidgetDelegate; 17 class StatusAreaWidgetDelegate;
18 class SystemTray; 18 class SystemTray;
19 class WebNotificationTray; 19 class WebNotificationTray;
20 class WmShelf; 20 class WmShelf;
21 class WmWindow; 21 class WmWindow;
22 #if defined(OS_CHROMEOS) 22 #if defined(OS_CHROMEOS)
23 class ImeMenuTray;
23 class LogoutButtonTray; 24 class LogoutButtonTray;
24 class VirtualKeyboardTray; 25 class VirtualKeyboardTray;
25 #endif 26 #endif
26 27
27 class ASH_EXPORT StatusAreaWidget : public views::Widget { 28 class ASH_EXPORT StatusAreaWidget : public views::Widget {
28 public: 29 public:
29 StatusAreaWidget(WmWindow* status_container, WmShelf* wm_shelf); 30 StatusAreaWidget(WmWindow* status_container, WmShelf* wm_shelf);
30 ~StatusAreaWidget() override; 31 ~StatusAreaWidget() override;
31 32
32 // Creates the SystemTray, WebNotificationTray and LogoutButtonTray. 33 // Creates the SystemTray, WebNotificationTray and LogoutButtonTray.
(...skipping 19 matching lines...) Expand all
52 } 53 }
53 SystemTray* system_tray() { return system_tray_; } 54 SystemTray* system_tray() { return system_tray_; }
54 WebNotificationTray* web_notification_tray() { 55 WebNotificationTray* web_notification_tray() {
55 return web_notification_tray_; 56 return web_notification_tray_;
56 } 57 }
57 OverviewButtonTray* overview_button_tray() { return overview_button_tray_; } 58 OverviewButtonTray* overview_button_tray() { return overview_button_tray_; }
58 WmShelf* wm_shelf() { return wm_shelf_; } 59 WmShelf* wm_shelf() { return wm_shelf_; }
59 60
60 LoginStatus login_status() const { return login_status_; } 61 LoginStatus login_status() const { return login_status_; }
61 62
63 #if defined(OS_CHROMEOS)
64 ImeMenuTray* ime_menu_tray() { return ime_menu_tray_; }
65 #endif
66
62 // Returns true if the shelf should be visible. This is used when the 67 // Returns true if the shelf should be visible. This is used when the
63 // shelf is configured to auto-hide and test if the shelf should force 68 // shelf is configured to auto-hide and test if the shelf should force
64 // the shelf to remain visible. 69 // the shelf to remain visible.
65 bool ShouldShowShelf() const; 70 bool ShouldShowShelf() const;
66 71
67 // True if any message bubble is shown. 72 // True if any message bubble is shown.
68 bool IsMessageBubbleShown() const; 73 bool IsMessageBubbleShown() const;
69 74
70 // Notifies child trays, and the |status_area_widget_delegate_| to schedule a 75 // Notifies child trays, and the |status_area_widget_delegate_| to schedule a
71 // paint. 76 // paint.
72 void SchedulePaint(); 77 void SchedulePaint();
73 78
74 // Overridden from views::Widget: 79 // Overridden from views::Widget:
75 void OnNativeWidgetActivationChanged(bool active) override; 80 void OnNativeWidgetActivationChanged(bool active) override;
76 void OnMouseEvent(ui::MouseEvent* event) override; 81 void OnMouseEvent(ui::MouseEvent* event) override;
77 void OnGestureEvent(ui::GestureEvent* event) override; 82 void OnGestureEvent(ui::GestureEvent* event) override;
78 83
79 private: 84 private:
80 void AddSystemTray(); 85 void AddSystemTray();
81 void AddWebNotificationTray(); 86 void AddWebNotificationTray();
82 #if defined(OS_CHROMEOS) 87 #if defined(OS_CHROMEOS)
83 void AddLogoutButtonTray(); 88 void AddLogoutButtonTray();
84 void AddVirtualKeyboardTray(); 89 void AddVirtualKeyboardTray();
90 void AddImeMenuTray();
85 #endif 91 #endif
86 void AddOverviewButtonTray(); 92 void AddOverviewButtonTray();
87 93
88 // Weak pointers to View classes that are parented to StatusAreaWidget: 94 // Weak pointers to View classes that are parented to StatusAreaWidget:
89 StatusAreaWidgetDelegate* status_area_widget_delegate_; 95 StatusAreaWidgetDelegate* status_area_widget_delegate_;
90 OverviewButtonTray* overview_button_tray_; 96 OverviewButtonTray* overview_button_tray_;
91 SystemTray* system_tray_; 97 SystemTray* system_tray_;
92 WebNotificationTray* web_notification_tray_; 98 WebNotificationTray* web_notification_tray_;
93 #if defined(OS_CHROMEOS) 99 #if defined(OS_CHROMEOS)
94 LogoutButtonTray* logout_button_tray_; 100 LogoutButtonTray* logout_button_tray_;
95 VirtualKeyboardTray* virtual_keyboard_tray_; 101 VirtualKeyboardTray* virtual_keyboard_tray_;
102 ImeMenuTray* ime_menu_tray_;
96 #endif 103 #endif
97 LoginStatus login_status_; 104 LoginStatus login_status_;
98 105
99 WmShelf* wm_shelf_; 106 WmShelf* wm_shelf_;
100 107
101 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); 108 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget);
102 }; 109 };
103 110
104 } // namespace ash 111 } // namespace ash
105 112
106 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_ 113 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698