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

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

Issue 2627933002: Removing logic on showing/hiding separator (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | ash/common/system/status_area_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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_background_animator_observer.h"
11 #include "ash/public/cpp/shelf_types.h" 11 #include "ash/public/cpp/shelf_types.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "ui/views/widget/widget.h" 13 #include "ui/views/widget/widget.h"
14 14
15 namespace ash { 15 namespace ash {
16 class OverviewButtonTray; 16 class OverviewButtonTray;
17 class ShellDelegate; 17 class ShellDelegate;
18 class StatusAreaWidgetDelegate; 18 class StatusAreaWidgetDelegate;
19 class SystemTray; 19 class SystemTray;
20 class TrayBackgroundView;
21 class WebNotificationTray; 20 class WebNotificationTray;
22 class WmShelf; 21 class WmShelf;
23 class WmWindow; 22 class WmWindow;
24 #if defined(OS_CHROMEOS) 23 #if defined(OS_CHROMEOS)
25 class ImeMenuTray; 24 class ImeMenuTray;
26 class LogoutButtonTray; 25 class LogoutButtonTray;
27 class PaletteTray; 26 class PaletteTray;
28 class VirtualKeyboardTray; 27 class VirtualKeyboardTray;
29 #endif 28 #endif
30 29
(...skipping 11 matching lines...) Expand all
42 void Shutdown(); 41 void Shutdown();
43 42
44 // Update the alignment of the widget and tray views. 43 // Update the alignment of the widget and tray views.
45 void SetShelfAlignment(ShelfAlignment alignment); 44 void SetShelfAlignment(ShelfAlignment alignment);
46 45
47 // Called by the client when the login status changes. Caches login_status 46 // Called by the client when the login status changes. Caches login_status
48 // and calls UpdateAfterLoginStatusChange for the system tray and the web 47 // and calls UpdateAfterLoginStatusChange for the system tray and the web
49 // notification tray. 48 // notification tray.
50 void UpdateAfterLoginStatusChange(LoginStatus login_status); 49 void UpdateAfterLoginStatusChange(LoginStatus login_status);
51 50
52 // Based on visibility of |tray| and a tray item on its right, sets |tray|'s
53 // separator visibility either to true or false. Note that no leading
54 // separator is required before the logout_button_tray because that
55 // button's red background is distinctive on its own.
56 void OnTrayVisibilityChanged(TrayBackgroundView* tray);
57
58 StatusAreaWidgetDelegate* status_area_widget_delegate() { 51 StatusAreaWidgetDelegate* status_area_widget_delegate() {
59 return status_area_widget_delegate_; 52 return status_area_widget_delegate_;
60 } 53 }
61 SystemTray* system_tray() { return system_tray_; } 54 SystemTray* system_tray() { return system_tray_; }
62 WebNotificationTray* web_notification_tray() { 55 WebNotificationTray* web_notification_tray() {
63 return web_notification_tray_; 56 return web_notification_tray_;
64 } 57 }
65 OverviewButtonTray* overview_button_tray() { return overview_button_tray_; } 58 OverviewButtonTray* overview_button_tray() { return overview_button_tray_; }
66 59
67 #if defined(OS_CHROMEOS) 60 #if defined(OS_CHROMEOS)
(...skipping 26 matching lines...) Expand all
94 void UpdateShelfItemBackground(int alpha) override; 87 void UpdateShelfItemBackground(int alpha) override;
95 88
96 private: 89 private:
97 void AddSystemTray(); 90 void AddSystemTray();
98 void AddWebNotificationTray(); 91 void AddWebNotificationTray();
99 #if defined(OS_CHROMEOS) 92 #if defined(OS_CHROMEOS)
100 void AddLogoutButtonTray(); 93 void AddLogoutButtonTray();
101 void AddPaletteTray(); 94 void AddPaletteTray();
102 void AddVirtualKeyboardTray(); 95 void AddVirtualKeyboardTray();
103 void AddImeMenuTray(); 96 void AddImeMenuTray();
104
105 // Checks if |tray| is the next visible tray to the left of
106 // |logout_button_tray_|. Returns true if both are visible, false otherwise.
107 bool IsNextVisibleTrayToLogout(TrayBackgroundView* tray) const;
108 #endif 97 #endif
109 void AddOverviewButtonTray(); 98 void AddOverviewButtonTray();
110 99
111 // Weak pointers to View classes that are parented to StatusAreaWidget: 100 // Weak pointers to View classes that are parented to StatusAreaWidget:
112 StatusAreaWidgetDelegate* status_area_widget_delegate_; 101 StatusAreaWidgetDelegate* status_area_widget_delegate_;
113 OverviewButtonTray* overview_button_tray_; 102 OverviewButtonTray* overview_button_tray_;
114 SystemTray* system_tray_; 103 SystemTray* system_tray_;
115 WebNotificationTray* web_notification_tray_; 104 WebNotificationTray* web_notification_tray_;
116 #if defined(OS_CHROMEOS) 105 #if defined(OS_CHROMEOS)
117 LogoutButtonTray* logout_button_tray_; 106 LogoutButtonTray* logout_button_tray_;
118 PaletteTray* palette_tray_; 107 PaletteTray* palette_tray_;
119 VirtualKeyboardTray* virtual_keyboard_tray_; 108 VirtualKeyboardTray* virtual_keyboard_tray_;
120 ImeMenuTray* ime_menu_tray_; 109 ImeMenuTray* ime_menu_tray_;
121 #endif 110 #endif
122 LoginStatus login_status_; 111 LoginStatus login_status_;
123 112
124 WmShelf* wm_shelf_; 113 WmShelf* wm_shelf_;
125 114
126 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); 115 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget);
127 }; 116 };
128 117
129 } // namespace ash 118 } // namespace ash
130 119
131 #endif // ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_H_ 120 #endif // ASH_COMMON_SYSTEM_STATUS_AREA_WIDGET_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/status_area_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698