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

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

Issue 2930123002: Tablet WM : Swiping on system tray bubble. (Closed)
Patch Set: Fixed comments. 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
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
10 #include <vector> 10 #include <vector>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 bool IsVisible(); 54 bool IsVisible();
55 55
56 // Returns true if any of the SystemTrayItems return true from 56 // Returns true if any of the SystemTrayItems return true from
57 // ShouldShowShelf(). 57 // ShouldShowShelf().
58 bool ShouldShowShelf() const; 58 bool ShouldShowShelf() const;
59 59
60 // Records metrics for visible system menu rows. Only implemented for the 60 // Records metrics for visible system menu rows. Only implemented for the
61 // BUBBLE_TYPE_DEFAULT BubbleType. 61 // BUBBLE_TYPE_DEFAULT BubbleType.
62 void RecordVisibleRowMetrics(); 62 void RecordVisibleRowMetrics();
63 63
64 // Update the bounds of the system tray bubble. Close the bubble if
65 // |close_bubble| is set.
66 void AnimateToTargetBounds(const gfx::Rect& target_bounds, bool close_bubble);
67
64 private: 68 private:
65 // Updates the bottom padding of the |bubble_view_| based on the 69 // Updates the bottom padding of the |bubble_view_| based on the
66 // |bubble_type_|. 70 // |bubble_type_|.
67 void UpdateBottomPadding(); 71 void UpdateBottomPadding();
68 void CreateItemViews(LoginStatus login_status); 72 void CreateItemViews(LoginStatus login_status);
69 73
70 ash::SystemTray* tray_; 74 ash::SystemTray* tray_;
71 views::TrayBubbleView* bubble_view_; 75 views::TrayBubbleView* bubble_view_;
72 std::vector<ash::SystemTrayItem*> items_; 76 std::vector<ash::SystemTrayItem*> items_;
73 BubbleType bubble_type_; 77 BubbleType bubble_type_;
74 78
75 // Tracks the views created in the last call to CreateItemViews(). 79 // Tracks the views created in the last call to CreateItemViews().
76 std::map<SystemTrayItem::UmaType, views::View*> tray_item_view_map_; 80 std::map<SystemTrayItem::UmaType, views::View*> tray_item_view_map_;
77 81
78 int autoclose_delay_; 82 int autoclose_delay_;
79 base::OneShotTimer autoclose_; 83 base::OneShotTimer autoclose_;
80 84
85 // Used in maximize mode to make sure the system tray bubble only be shown in
86 // work area.
87 std::unique_ptr<aura::Window> clipping_window_;
88
81 DISALLOW_COPY_AND_ASSIGN(SystemTrayBubble); 89 DISALLOW_COPY_AND_ASSIGN(SystemTrayBubble);
82 }; 90 };
83 91
84 } // namespace ash 92 } // namespace ash
85 93
86 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_ 94 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698