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" |
11 #include "ash/system/tray/tray_views.h" | 11 #include "ash/system/tray/tray_views.h" |
12 #include "ash/system/user/login_status.h" | 12 #include "ash/system/user/login_status.h" |
| 13 #include "ash/wm/shelf_auto_hide_behavior.h" |
13 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
14 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
15 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
16 #include "base/memory/scoped_vector.h" | 17 #include "base/memory/scoped_vector.h" |
17 #include "ui/views/view.h" | 18 #include "ui/views/view.h" |
18 | 19 |
19 #include <map> | 20 #include <map> |
20 #include <vector> | 21 #include <vector> |
21 | 22 |
22 namespace ash { | 23 namespace ash { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 } | 138 } |
138 UserObserver* user_observer() const { | 139 UserObserver* user_observer() const { |
139 return user_observer_; | 140 return user_observer_; |
140 } | 141 } |
141 | 142 |
142 // Accessors for testing. | 143 // Accessors for testing. |
143 | 144 |
144 // Returns true if the bubble exists. | 145 // Returns true if the bubble exists. |
145 bool CloseBubbleForTest() const; | 146 bool CloseBubbleForTest() const; |
146 | 147 |
| 148 void SetAlignment(ShelfAlignment alignment); |
| 149 ShelfAlignment GetAlignment() const; |
| 150 |
147 private: | 151 private: |
148 friend class internal::SystemTrayLayerAnimationObserver; | 152 friend class internal::SystemTrayLayerAnimationObserver; |
149 friend class internal::SystemTrayBubble; | 153 friend class internal::SystemTrayBubble; |
150 | 154 |
151 // Called when the widget associated with |bubble| closes. |bubble| should | 155 // Called when the widget associated with |bubble| closes. |bubble| should |
152 // always == |bubble_|. This triggers destroying |bubble_| and hiding the | 156 // always == |bubble_|. This triggers destroying |bubble_| and hiding the |
153 // launcher if necessary. | 157 // launcher if necessary. |
154 void RemoveBubble(internal::SystemTrayBubble* bubble); | 158 void RemoveBubble(internal::SystemTrayBubble* bubble); |
155 | 159 |
156 const ScopedVector<SystemTrayItem>& items() const { return items_; } | 160 const ScopedVector<SystemTrayItem>& items() const { return items_; } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 226 |
223 // Buble for notifications. | 227 // Buble for notifications. |
224 scoped_ptr<internal::SystemTrayBubble> notification_bubble_; | 228 scoped_ptr<internal::SystemTrayBubble> notification_bubble_; |
225 | 229 |
226 // Owned by the view it's installed on. | 230 // Owned by the view it's installed on. |
227 internal::SystemTrayBackground* background_; | 231 internal::SystemTrayBackground* background_; |
228 | 232 |
229 // See description agove getter. | 233 // See description agove getter. |
230 bool should_show_launcher_; | 234 bool should_show_launcher_; |
231 | 235 |
| 236 // Shelf alignment. |
| 237 ShelfAlignment shelf_alignment_; |
| 238 |
232 internal::BackgroundAnimator hide_background_animator_; | 239 internal::BackgroundAnimator hide_background_animator_; |
233 internal::BackgroundAnimator hover_background_animator_; | 240 internal::BackgroundAnimator hover_background_animator_; |
234 scoped_ptr<internal::SystemTrayLayerAnimationObserver> | 241 scoped_ptr<internal::SystemTrayLayerAnimationObserver> |
235 layer_animation_observer_; | 242 layer_animation_observer_; |
236 | 243 |
237 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 244 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
238 }; | 245 }; |
239 | 246 |
240 } // namespace ash | 247 } // namespace ash |
241 | 248 |
242 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 249 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
OLD | NEW |