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_BUBBLE_H_ | 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_ |
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_ | 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 20 matching lines...) Expand all Loading... |
31 // Change the items displayed in the bubble. | 31 // Change the items displayed in the bubble. |
32 void UpdateView(const std::vector<ash::SystemTrayItem*>& items, | 32 void UpdateView(const std::vector<ash::SystemTrayItem*>& items, |
33 BubbleType bubble_type); | 33 BubbleType bubble_type); |
34 | 34 |
35 // Creates |bubble_view_| and a child views for each member of |items_|. | 35 // Creates |bubble_view_| and a child views for each member of |items_|. |
36 // Also creates |bubble_wrapper_|. |init_params| may be modified. | 36 // Also creates |bubble_wrapper_|. |init_params| may be modified. |
37 void InitView(views::View* anchor, | 37 void InitView(views::View* anchor, |
38 LoginStatus login_status, | 38 LoginStatus login_status, |
39 views::TrayBubbleView::InitParams* init_params); | 39 views::TrayBubbleView::InitParams* init_params); |
40 | 40 |
41 // Focus the default item if no item is focused. Othewise, do nothing. | |
42 void FocusDefaultIfNeeded(); | |
43 | |
44 BubbleType bubble_type() const { return bubble_type_; } | 41 BubbleType bubble_type() const { return bubble_type_; } |
45 views::TrayBubbleView* bubble_view() const { return bubble_view_; } | 42 views::TrayBubbleView* bubble_view() const { return bubble_view_; } |
46 | 43 |
47 void DestroyItemViews(); | 44 void DestroyItemViews(); |
48 void BubbleViewDestroyed(); | 45 void BubbleViewDestroyed(); |
49 void StartAutoCloseTimer(int seconds); | 46 void StartAutoCloseTimer(int seconds); |
50 void StopAutoCloseTimer(); | 47 void StopAutoCloseTimer(); |
51 void RestartAutoCloseTimer(); | 48 void RestartAutoCloseTimer(); |
52 void Close(); | 49 void Close(); |
53 void SetVisible(bool is_visible); | 50 void SetVisible(bool is_visible); |
(...skipping 23 matching lines...) Expand all Loading... |
77 | 74 |
78 int autoclose_delay_; | 75 int autoclose_delay_; |
79 base::OneShotTimer autoclose_; | 76 base::OneShotTimer autoclose_; |
80 | 77 |
81 DISALLOW_COPY_AND_ASSIGN(SystemTrayBubble); | 78 DISALLOW_COPY_AND_ASSIGN(SystemTrayBubble); |
82 }; | 79 }; |
83 | 80 |
84 } // namespace ash | 81 } // namespace ash |
85 | 82 |
86 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_ | 83 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_ |
OLD | NEW |