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

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: Remove kStatusTrayShelfID. 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 LogoutButtonTray; 23 class LogoutButtonTray;
24 class VirtualKeyboardTray; 24 class VirtualKeyboardTray;
25 class ImeMenuTray;
sadrul 2016/06/27 15:08:05 sort
Azure Wei 2016/06/27 18:33:49 Done.
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.
33 void CreateTrayViews(); 34 void CreateTrayViews();
34 35
(...skipping 19 matching lines...) Expand all
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() { 58 OverviewButtonTray* overview_button_tray() {
58 return overview_button_tray_; 59 return overview_button_tray_;
59 } 60 }
60 WmShelf* wm_shelf() { return wm_shelf_; } 61 WmShelf* wm_shelf() { return wm_shelf_; }
61 62
62 LoginStatus login_status() const { return login_status_; } 63 LoginStatus login_status() const { return login_status_; }
63 64
65 #if defined(OS_CHROMEOS)
66 ImeMenuTray* ime_menu_tray() { return ime_menu_tray_; }
67 #endif
68
64 // Returns true if the shelf should be visible. This is used when the 69 // Returns true if the shelf should be visible. This is used when the
65 // shelf is configured to auto-hide and test if the shelf should force 70 // shelf is configured to auto-hide and test if the shelf should force
66 // the shelf to remain visible. 71 // the shelf to remain visible.
67 bool ShouldShowShelf() const; 72 bool ShouldShowShelf() const;
68 73
69 // True if any message bubble is shown. 74 // True if any message bubble is shown.
70 bool IsMessageBubbleShown() const; 75 bool IsMessageBubbleShown() const;
71 76
72 // Notifies child trays, and the |status_area_widget_delegate_| to schedule a 77 // Notifies child trays, and the |status_area_widget_delegate_| to schedule a
73 // paint. 78 // paint.
74 void SchedulePaint(); 79 void SchedulePaint();
75 80
76 // Overridden from views::Widget: 81 // Overridden from views::Widget:
77 void OnNativeWidgetActivationChanged(bool active) override; 82 void OnNativeWidgetActivationChanged(bool active) override;
78 void OnMouseEvent(ui::MouseEvent* event) override; 83 void OnMouseEvent(ui::MouseEvent* event) override;
79 void OnGestureEvent(ui::GestureEvent* event) override; 84 void OnGestureEvent(ui::GestureEvent* event) override;
80 85
81 private: 86 private:
82 void AddSystemTray(); 87 void AddSystemTray();
83 void AddWebNotificationTray(); 88 void AddWebNotificationTray();
84 #if defined(OS_CHROMEOS) 89 #if defined(OS_CHROMEOS)
85 void AddLogoutButtonTray(); 90 void AddLogoutButtonTray();
86 void AddVirtualKeyboardTray(); 91 void AddVirtualKeyboardTray();
92 void AddImeMenuTray();
87 #endif 93 #endif
88 void AddOverviewButtonTray(); 94 void AddOverviewButtonTray();
89 95
90 // Weak pointers to View classes that are parented to StatusAreaWidget: 96 // Weak pointers to View classes that are parented to StatusAreaWidget:
91 StatusAreaWidgetDelegate* status_area_widget_delegate_; 97 StatusAreaWidgetDelegate* status_area_widget_delegate_;
92 OverviewButtonTray* overview_button_tray_; 98 OverviewButtonTray* overview_button_tray_;
93 SystemTray* system_tray_; 99 SystemTray* system_tray_;
94 WebNotificationTray* web_notification_tray_; 100 WebNotificationTray* web_notification_tray_;
95 #if defined(OS_CHROMEOS) 101 #if defined(OS_CHROMEOS)
96 LogoutButtonTray* logout_button_tray_; 102 LogoutButtonTray* logout_button_tray_;
97 VirtualKeyboardTray* virtual_keyboard_tray_; 103 VirtualKeyboardTray* virtual_keyboard_tray_;
104 ImeMenuTray* ime_menu_tray_;
98 #endif 105 #endif
99 LoginStatus login_status_; 106 LoginStatus login_status_;
100 107
101 WmShelf* wm_shelf_; 108 WmShelf* wm_shelf_;
102 109
103 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); 110 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget);
104 }; 111 };
105 112
106 } // namespace ash 113 } // namespace ash
107 114
108 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_ 115 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698