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

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

Issue 11028134: Re-factor Ash Message Center code part 2/4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ash/ash.gyp ('k') | ash/system/tray/system_tray.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_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 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/system/power/power_supply_status.h" 9 #include "ash/system/power/power_supply_status.h"
10 #include "ash/system/tray/tray_background_view.h" 10 #include "ash/system/tray/tray_background_view.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // Accessors for testing. 152 // Accessors for testing.
153 153
154 // Returns true if the bubble exists. 154 // Returns true if the bubble exists.
155 bool CloseBubbleForTest() const; 155 bool CloseBubbleForTest() const;
156 156
157 // Overridden from TrayBackgroundView. 157 // Overridden from TrayBackgroundView.
158 virtual void Initialize() OVERRIDE; 158 virtual void Initialize() OVERRIDE;
159 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE; 159 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE;
160 virtual void AnchorUpdated() OVERRIDE; 160 virtual void AnchorUpdated() OVERRIDE;
161 virtual string16 GetAccessibleName() OVERRIDE; 161 virtual string16 GetAccessibleName() OVERRIDE;
162 virtual void HideBubbleWithView(const TrayBubbleView* bubble_view) OVERRIDE;
163 virtual bool ClickedOutsideBubble() OVERRIDE;
162 164
163 private: 165 private:
164 friend class internal::SystemTrayBubble; 166 friend class internal::SystemTrayBubble;
165 friend class internal::TrayGestureHandler; 167 friend class internal::TrayGestureHandler;
166 168
167 // Resets |bubble_| and clears any related state. 169 // Resets |bubble_| and clears any related state.
168 void DestroyBubble(); 170 void DestroyBubble();
169 171
170 // Resets |notification_bubble_| and clears any related state. 172 // Resets |notification_bubble_| and clears any related state.
171 void DestroyNotificationBubble(); 173 void DestroyNotificationBubble();
172 174
173 // Called when the widget associated with |bubble| closes. |bubble| should
174 // always == |bubble_|. This triggers destroying |bubble_| and hiding the
175 // launcher if necessary.
176 void RemoveBubble(internal::SystemTrayBubble* bubble);
177
178 const ScopedVector<SystemTrayItem>& items() const { return items_; } 175 const ScopedVector<SystemTrayItem>& items() const { return items_; }
179 176
180 // Calculates the x-offset for the item in the tray. Returns -1 if its tray 177 // Calculates the x-offset for the item in the tray. Returns -1 if its tray
181 // item view is not visible. 178 // item view is not visible.
182 int GetTrayXOffset(SystemTrayItem* item) const; 179 int GetTrayXOffset(SystemTrayItem* item) const;
183 180
184 // Shows the default view and its arrow position is shifted by |x_offset|. 181 // Shows the default view and its arrow position is shifted by |x_offset|.
185 void ShowDefaultViewWithOffset(BubbleCreationType creation_type, 182 void ShowDefaultViewWithOffset(BubbleCreationType creation_type,
186 int x_offset); 183 int x_offset);
187 184
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // Set to true when system notifications should be hidden (e.g. web 235 // Set to true when system notifications should be hidden (e.g. web
239 // notification bubble is visible). 236 // notification bubble is visible).
240 bool hide_notifications_; 237 bool hide_notifications_;
241 238
242 DISALLOW_COPY_AND_ASSIGN(SystemTray); 239 DISALLOW_COPY_AND_ASSIGN(SystemTray);
243 }; 240 };
244 241
245 } // namespace ash 242 } // namespace ash
246 243
247 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ 244 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698