| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 145 } |
| 145 UserObserver* user_observer() const { | 146 UserObserver* user_observer() const { |
| 146 return user_observer_; | 147 return user_observer_; |
| 147 } | 148 } |
| 148 | 149 |
| 149 // Accessors for testing. | 150 // Accessors for testing. |
| 150 | 151 |
| 151 // Returns true if the bubble exists. | 152 // Returns true if the bubble exists. |
| 152 bool CloseBubbleForTest() const; | 153 bool CloseBubbleForTest() const; |
| 153 | 154 |
| 155 void SetShelfAlignment(ShelfAlignment alignment); |
| 156 ShelfAlignment shelf_alignment() const { return shelf_alignment_; } |
| 157 |
| 154 private: | 158 private: |
| 155 friend class internal::SystemTrayLayerAnimationObserver; | 159 friend class internal::SystemTrayLayerAnimationObserver; |
| 156 friend class internal::SystemTrayBubble; | 160 friend class internal::SystemTrayBubble; |
| 157 | 161 |
| 158 // Called when the widget associated with |bubble| closes. |bubble| should | 162 // Called when the widget associated with |bubble| closes. |bubble| should |
| 159 // always == |bubble_|. This triggers destroying |bubble_| and hiding the | 163 // always == |bubble_|. This triggers destroying |bubble_| and hiding the |
| 160 // launcher if necessary. | 164 // launcher if necessary. |
| 161 void RemoveBubble(internal::SystemTrayBubble* bubble); | 165 void RemoveBubble(internal::SystemTrayBubble* bubble); |
| 162 | 166 |
| 163 const ScopedVector<SystemTrayItem>& items() const { return items_; } | 167 const ScopedVector<SystemTrayItem>& items() const { return items_; } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 237 |
| 234 // Buble for notifications. | 238 // Buble for notifications. |
| 235 scoped_ptr<internal::SystemTrayBubble> notification_bubble_; | 239 scoped_ptr<internal::SystemTrayBubble> notification_bubble_; |
| 236 | 240 |
| 237 // Owned by the view it's installed on. | 241 // Owned by the view it's installed on. |
| 238 internal::SystemTrayBackground* background_; | 242 internal::SystemTrayBackground* background_; |
| 239 | 243 |
| 240 // See description agove getter. | 244 // See description agove getter. |
| 241 bool should_show_launcher_; | 245 bool should_show_launcher_; |
| 242 | 246 |
| 247 // Shelf alignment. |
| 248 ShelfAlignment shelf_alignment_; |
| 249 |
| 243 internal::BackgroundAnimator hide_background_animator_; | 250 internal::BackgroundAnimator hide_background_animator_; |
| 244 internal::BackgroundAnimator hover_background_animator_; | 251 internal::BackgroundAnimator hover_background_animator_; |
| 245 scoped_ptr<internal::SystemTrayLayerAnimationObserver> | 252 scoped_ptr<internal::SystemTrayLayerAnimationObserver> |
| 246 layer_animation_observer_; | 253 layer_animation_observer_; |
| 247 | 254 |
| 248 DISALLOW_COPY_AND_ASSIGN(SystemTray); | 255 DISALLOW_COPY_AND_ASSIGN(SystemTray); |
| 249 }; | 256 }; |
| 250 | 257 |
| 251 } // namespace ash | 258 } // namespace ash |
| 252 | 259 |
| 253 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ | 260 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ |
| OLD | NEW |