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

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

Issue 11519036: A11y: Add a browser test of TrayAccessibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (r172817) Created 8 years 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 | « no previous file | ash/system/tray/system_tray.cc » ('j') | ash/system/tray_accessibility.h » ('J')
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/system_tray_bubble.h" 10 #include "ash/system/tray/system_tray_bubble.h"
(...skipping 29 matching lines...) Expand all
40 #if defined(OS_CHROMEOS) 40 #if defined(OS_CHROMEOS)
41 class NetworkObserver; 41 class NetworkObserver;
42 class SmsObserver; 42 class SmsObserver;
43 #endif 43 #endif
44 44
45 class SystemTrayItem; 45 class SystemTrayItem;
46 46
47 namespace internal { 47 namespace internal {
48 class SystemBubbleWrapper; 48 class SystemBubbleWrapper;
49 class SystemTrayContainer; 49 class SystemTrayContainer;
50 class TrayAccessibility;
50 class TrayGestureHandler; 51 class TrayGestureHandler;
51 } 52 }
52 53
53 // There are different methods for creating bubble views. 54 // There are different methods for creating bubble views.
54 enum BubbleCreationType { 55 enum BubbleCreationType {
55 BUBBLE_CREATE_NEW, // Closes any existing bubble and creates a new one. 56 BUBBLE_CREATE_NEW, // Closes any existing bubble and creates a new one.
56 BUBBLE_USE_EXISTING, // Uses any existing bubble, or creates a new one. 57 BUBBLE_USE_EXISTING, // Uses any existing bubble, or creates a new one.
57 }; 58 };
58 59
59 class ASH_EXPORT SystemTray : public internal::TrayBackgroundView, 60 class ASH_EXPORT SystemTray : public internal::TrayBackgroundView,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // Overridden from message_center::TrayBubbleView::Delegate. 137 // Overridden from message_center::TrayBubbleView::Delegate.
137 virtual void BubbleViewDestroyed() OVERRIDE; 138 virtual void BubbleViewDestroyed() OVERRIDE;
138 virtual void OnMouseEnteredView() OVERRIDE; 139 virtual void OnMouseEnteredView() OVERRIDE;
139 virtual void OnMouseExitedView() OVERRIDE; 140 virtual void OnMouseExitedView() OVERRIDE;
140 virtual string16 GetAccessibleNameForBubble() OVERRIDE; 141 virtual string16 GetAccessibleNameForBubble() OVERRIDE;
141 virtual gfx::Rect GetAnchorRect(views::Widget* anchor_widget, 142 virtual gfx::Rect GetAnchorRect(views::Widget* anchor_widget,
142 AnchorType anchor_type, 143 AnchorType anchor_type,
143 AnchorAlignment anchor_alignment) OVERRIDE; 144 AnchorAlignment anchor_alignment) OVERRIDE;
144 virtual void HideBubble(const views::TrayBubbleView* bubble_view) OVERRIDE; 145 virtual void HideBubble(const views::TrayBubbleView* bubble_view) OVERRIDE;
145 146
147 internal::TrayAccessibility* GetTrayAccessibilityForTest() {
148 return tray_accessibility_;
149 }
150
146 private: 151 private:
147 // Creates the default set of items for the sytem tray. 152 // Creates the default set of items for the sytem tray.
148 void CreateItems(SystemTrayDelegate* delegate); 153 void CreateItems(SystemTrayDelegate* delegate);
149 154
150 // Returns true if the system_bubble_ exists and is of type |type|. 155 // Returns true if the system_bubble_ exists and is of type |type|.
151 bool HasSystemBubbleType(internal::SystemTrayBubble::BubbleType type); 156 bool HasSystemBubbleType(internal::SystemTrayBubble::BubbleType type);
152 157
153 // Resets |system_bubble_| and clears any related state. 158 // Resets |system_bubble_| and clears any related state.
154 void DestroySystemBubble(); 159 void DestroySystemBubble();
155 160
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 scoped_ptr<internal::SystemBubbleWrapper> notification_bubble_; 202 scoped_ptr<internal::SystemBubbleWrapper> notification_bubble_;
198 203
199 // Keep track of the default view height so that when we create detailed 204 // Keep track of the default view height so that when we create detailed
200 // views directly (e.g. from a notification) we know what height to use. 205 // views directly (e.g. from a notification) we know what height to use.
201 int default_bubble_height_; 206 int default_bubble_height_;
202 207
203 // Set to true when system notifications should be hidden (e.g. web 208 // Set to true when system notifications should be hidden (e.g. web
204 // notification bubble is visible). 209 // notification bubble is visible).
205 bool hide_notifications_; 210 bool hide_notifications_;
206 211
212 internal::TrayAccessibility* tray_accessibility_; // not own
stevenjb 2012/12/14 00:38:28 nit: 'not owned' or 'unowned'
yoshiki 2012/12/14 06:10:19 Done.
213
207 DISALLOW_COPY_AND_ASSIGN(SystemTray); 214 DISALLOW_COPY_AND_ASSIGN(SystemTray);
208 }; 215 };
209 216
210 } // namespace ash 217 } // namespace ash
211 218
212 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_ 219 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_H_
OLDNEW
« no previous file with comments | « no previous file | ash/system/tray/system_tray.cc » ('j') | ash/system/tray_accessibility.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698