| 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_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ |
| 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "ash/common/login_status.h" | 11 #include "ash/common/login_status.h" |
| 12 #include "ash/public/cpp/shelf_types.h" | 12 #include "ash/public/cpp/shelf_types.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 | 14 #include "base/timer/timer.h" |
| 15 namespace base { | |
| 16 class OneShotTimer; | |
| 17 } // namespace base | |
| 18 | 15 |
| 19 namespace views { | 16 namespace views { |
| 20 class View; | 17 class View; |
| 21 } | 18 } |
| 22 | 19 |
| 23 namespace ash { | 20 namespace ash { |
| 24 class SystemTray; | 21 class SystemTray; |
| 25 class SystemTrayBubble; | 22 class SystemTrayBubble; |
| 26 class TrayItemView; | 23 class TrayItemView; |
| 27 | 24 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // the shelf is in the auto-hide state. Default is true. | 144 // the shelf is in the auto-hide state. Default is true. |
| 148 virtual bool ShouldShowShelf() const; | 145 virtual bool ShouldShowShelf() const; |
| 149 | 146 |
| 150 // Returns the system tray that this item belongs to. | 147 // Returns the system tray that this item belongs to. |
| 151 SystemTray* system_tray() const { return system_tray_; } | 148 SystemTray* system_tray() const { return system_tray_; } |
| 152 | 149 |
| 153 bool restore_focus() const { return restore_focus_; } | 150 bool restore_focus() const { return restore_focus_; } |
| 154 void set_restore_focus(bool restore_focus) { restore_focus_ = restore_focus; } | 151 void set_restore_focus(bool restore_focus) { restore_focus_ = restore_focus; } |
| 155 | 152 |
| 156 private: | 153 private: |
| 157 // Actually transitions to the detailed view. | |
| 158 void DoTransitionToDetailedView(); | |
| 159 | |
| 160 // Accesses uma_type(). | 154 // Accesses uma_type(). |
| 161 friend class SystemTrayBubble; | 155 friend class SystemTrayBubble; |
| 162 | 156 |
| 163 UmaType uma_type() const { return uma_type_; } | 157 UmaType uma_type() const { return uma_type_; } |
| 164 | 158 |
| 165 SystemTray* system_tray_; | 159 SystemTray* system_tray_; |
| 166 UmaType uma_type_; | 160 UmaType uma_type_; |
| 167 bool restore_focus_; | 161 bool restore_focus_; |
| 168 | 162 |
| 169 // Used to delay the transition to the detailed view. | 163 // Used to delay the transition to the detailed view. |
| 170 std::unique_ptr<base::OneShotTimer> transition_delay_timer_; | 164 base::OneShotTimer transition_delay_timer_; |
| 171 | 165 |
| 172 DISALLOW_COPY_AND_ASSIGN(SystemTrayItem); | 166 DISALLOW_COPY_AND_ASSIGN(SystemTrayItem); |
| 173 }; | 167 }; |
| 174 | 168 |
| 175 } // namespace ash | 169 } // namespace ash |
| 176 | 170 |
| 177 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ | 171 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_ITEM_H_ |
| OLD | NEW |