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

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

Issue 10825389: Fix accessability for web notification tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix asan bug Created 8 years, 4 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/system/status_area_widget_delegate.cc ('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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 // Accessors for testing. 150 // Accessors for testing.
151 151
152 // Returns true if the bubble exists. 152 // Returns true if the bubble exists.
153 bool CloseBubbleForTest() const; 153 bool CloseBubbleForTest() const;
154 154
155 // Overridden from TrayBackgroundView. 155 // Overridden from TrayBackgroundView.
156 virtual void Initialize() OVERRIDE; 156 virtual void Initialize() OVERRIDE;
157 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE; 157 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE;
158 virtual void AnchorUpdated() OVERRIDE; 158 virtual void AnchorUpdated() OVERRIDE;
159 virtual string16 GetAccessibleName() OVERRIDE;
159 160
160 private: 161 private:
161 friend class internal::SystemTrayBubble; 162 friend class internal::SystemTrayBubble;
162 163
163 // Resets |bubble_| and clears any related state. 164 // Resets |bubble_| and clears any related state.
164 void DestroyBubble(); 165 void DestroyBubble();
165 166
166 // Called when the widget associated with |bubble| closes. |bubble| should 167 // Called when the widget associated with |bubble| closes. |bubble| should
167 // always == |bubble_|. This triggers destroying |bubble_| and hiding the 168 // always == |bubble_|. This triggers destroying |bubble_| and hiding the
168 // launcher if necessary. 169 // launcher if necessary.
(...skipping 16 matching lines...) Expand all
185 BubbleCreationType creation_type, 186 BubbleCreationType creation_type,
186 int x_offset); 187 int x_offset);
187 188
188 // Constructs or re-constructs |notification_bubble_| and populates it with 189 // Constructs or re-constructs |notification_bubble_| and populates it with
189 // |notification_items_|, or destroys it if there are no notification items. 190 // |notification_items_|, or destroys it if there are no notification items.
190 void UpdateNotificationBubble(); 191 void UpdateNotificationBubble();
191 192
192 // Overridden from internal::ActionableView. 193 // Overridden from internal::ActionableView.
193 virtual bool PerformAction(const ui::Event& event) OVERRIDE; 194 virtual bool PerformAction(const ui::Event& event) OVERRIDE;
194 195
195 // Overridden from views::View.
196 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
197
198 // Owned items. 196 // Owned items.
199 ScopedVector<SystemTrayItem> items_; 197 ScopedVector<SystemTrayItem> items_;
200 198
201 // Pointers to members of |items_|. 199 // Pointers to members of |items_|.
202 SystemTrayItem* detailed_item_; 200 SystemTrayItem* detailed_item_;
203 std::vector<SystemTrayItem*> notification_items_; 201 std::vector<SystemTrayItem*> notification_items_;
204 202
205 // Mappings of system tray item and it's view in the tray. 203 // Mappings of system tray item and it's view in the tray.
206 std::map<SystemTrayItem*, views::View*> tray_item_map_; 204 std::map<SystemTrayItem*, views::View*> tray_item_map_;
207 205
(...skipping 26 matching lines...) Expand all
234 // Set to true when system notifications should be hidden (e.g. web 232 // Set to true when system notifications should be hidden (e.g. web
235 // notification bubble is visible). 233 // notification bubble is visible).
236 bool hide_notifications_; 234 bool hide_notifications_;
237 235
238 DISALLOW_COPY_AND_ASSIGN(SystemTray); 236 DISALLOW_COPY_AND_ASSIGN(SystemTray);
239 }; 237 };
240 238
241 } // namespace ash 239 } // namespace ash
242 240
243 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ 241 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
OLDNEW
« no previous file with comments | « ash/system/status_area_widget_delegate.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698