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_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/launcher/background_animator.h" | 9 #include "ash/launcher/background_animator.h" |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); | 72 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); |
73 | 73 |
74 const ScopedVector<SystemTrayItem>& items() const { return items_; } | 74 const ScopedVector<SystemTrayItem>& items() const { return items_; } |
75 | 75 |
76 // Sets whether the tray paints a background. Default is true, but is set to | 76 // Sets whether the tray paints a background. Default is true, but is set to |
77 // false if a window overlaps the shelf. | 77 // false if a window overlaps the shelf. |
78 void SetPaintsBackground( | 78 void SetPaintsBackground( |
79 bool value, | 79 bool value, |
80 internal::BackgroundAnimator::ChangeType change_type); | 80 internal::BackgroundAnimator::ChangeType change_type); |
81 | 81 |
| 82 // Take focus and activate the system tray. |
| 83 void TakeFocus(View* next_focusable_view); |
| 84 |
82 // Returns true if the launcher should show. | 85 // Returns true if the launcher should show. |
83 bool should_show_launcher() const { return popup_ && should_show_launcher_; } | 86 bool should_show_launcher() const { return popup_ && should_show_launcher_; } |
| 87 bool is_taking_focus() const { return taking_focus_; } |
84 | 88 |
85 AccessibilityObserver* accessibility_observer() const { | 89 AccessibilityObserver* accessibility_observer() const { |
86 return accessibility_observer_; | 90 return accessibility_observer_; |
87 } | 91 } |
88 AudioObserver* audio_observer() const { | 92 AudioObserver* audio_observer() const { |
89 return audio_observer_; | 93 return audio_observer_; |
90 } | 94 } |
91 BluetoothObserver* bluetooth_observer() const { | 95 BluetoothObserver* bluetooth_observer() const { |
92 return bluetooth_observer_; | 96 return bluetooth_observer_; |
93 } | 97 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 // The popup widget and the delegate. | 171 // The popup widget and the delegate. |
168 internal::SystemTrayBubble* bubble_; | 172 internal::SystemTrayBubble* bubble_; |
169 views::Widget* popup_; | 173 views::Widget* popup_; |
170 | 174 |
171 // Owned by the view it's installed on. | 175 // Owned by the view it's installed on. |
172 internal::SystemTrayBackground* background_; | 176 internal::SystemTrayBackground* background_; |
173 | 177 |
174 // See description agove getter. | 178 // See description agove getter. |
175 bool should_show_launcher_; | 179 bool should_show_launcher_; |
176 | 180 |
| 181 // Set when taking focus to indicate that the system area can be activated. |
| 182 bool taking_focus_; |
| 183 |
177 internal::BackgroundAnimator hide_background_animator_; | 184 internal::BackgroundAnimator hide_background_animator_; |
178 internal::BackgroundAnimator hover_background_animator_; | 185 internal::BackgroundAnimator hover_background_animator_; |
179 | 186 |
180 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 187 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
181 }; | 188 }; |
182 | 189 |
183 } // namespace ash | 190 } // namespace ash |
184 | 191 |
185 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 192 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
OLD | NEW |