Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: ash/system/tray/system_tray_bubble.h

Issue 2961313003: Touch gestures for System Tray/ IME/ Stylus/ Notifications (Closed)
Patch Set: Swiping IME/Stylues/System tray/Notifications tray/bubble. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
msw 2017/07/12 05:04:51 nit: remove if no longer needed
minch1 2017/07/13 19:10:35 Done.
10 #include <vector> 10 #include <vector>
11 11
12 #include "ash/login_status.h" 12 #include "ash/login_status.h"
13 #include "ash/system/tray/system_tray_item.h" 13 #include "ash/system/tray/system_tray_item.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/timer/timer.h" 15 #include "base/timer/timer.h"
16 #include "ui/views/bubble/tray_bubble_view.h" 16 #include "ui/views/bubble/tray_bubble_view.h"
17 17
18 namespace ash { 18 namespace ash {
19 class SystemTray; 19 class SystemTray;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 bool IsVisible(); 51 bool IsVisible();
52 52
53 // Returns true if any of the SystemTrayItems return true from 53 // Returns true if any of the SystemTrayItems return true from
54 // ShouldShowShelf(). 54 // ShouldShowShelf().
55 bool ShouldShowShelf() const; 55 bool ShouldShowShelf() const;
56 56
57 // Records metrics for visible system menu rows. Only implemented for the 57 // Records metrics for visible system menu rows. Only implemented for the
58 // BUBBLE_TYPE_DEFAULT BubbleType. 58 // BUBBLE_TYPE_DEFAULT BubbleType.
59 void RecordVisibleRowMetrics(); 59 void RecordVisibleRowMetrics();
60 60
61 // Update the bounds of the system tray bubble. Close the bubble if
62 // |close_bubble| is set.
63 void AnimateToTargetBounds(const gfx::Rect& target_bounds, bool close_bubble);
64
65 private: 61 private:
66 // Updates the bottom padding of the |bubble_view_| based on the 62 // Updates the bottom padding of the |bubble_view_| based on the
67 // |bubble_type_|. 63 // |bubble_type_|.
68 void UpdateBottomPadding(); 64 void UpdateBottomPadding();
69 void CreateItemViews(LoginStatus login_status); 65 void CreateItemViews(LoginStatus login_status);
70 66
71 ash::SystemTray* tray_; 67 ash::SystemTray* tray_;
72 views::TrayBubbleView* bubble_view_; 68 views::TrayBubbleView* bubble_view_;
73 std::vector<ash::SystemTrayItem*> items_; 69 std::vector<ash::SystemTrayItem*> items_;
74 BubbleType bubble_type_; 70 BubbleType bubble_type_;
75 71
76 // Tracks the views created in the last call to CreateItemViews(). 72 // Tracks the views created in the last call to CreateItemViews().
77 std::map<SystemTrayItem::UmaType, views::View*> tray_item_view_map_; 73 std::map<SystemTrayItem::UmaType, views::View*> tray_item_view_map_;
78 74
79 int autoclose_delay_; 75 int autoclose_delay_;
80 base::OneShotTimer autoclose_; 76 base::OneShotTimer autoclose_;
81 77
82 // Used in maximize mode to make sure the system tray bubble only be shown in
83 // work area.
84 std::unique_ptr<aura::Window> clipping_window_;
85
86 DISALLOW_COPY_AND_ASSIGN(SystemTrayBubble); 78 DISALLOW_COPY_AND_ASSIGN(SystemTrayBubble);
87 }; 79 };
88 80
89 } // namespace ash 81 } // namespace ash
90 82
91 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_ 83 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698