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

Side by Side Diff: chrome/browser/ui/views/tabs/tab.h

Issue 2497373003: Add tab status to accessibility labels (Closed)
Patch Set: Formatting and style Created 4 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
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 CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 // Returns the inverse of the slope of the diagonal portion of the tab outer 161 // Returns the inverse of the slope of the diagonal portion of the tab outer
162 // border. (This is a positive value, so it's specifically for the slope of 162 // border. (This is a positive value, so it's specifically for the slope of
163 // the leading edge.) 163 // the leading edge.)
164 // 164 //
165 // This returns the inverse (dx/dy instead of dy/dx) because we use exact 165 // This returns the inverse (dx/dy instead of dy/dx) because we use exact
166 // values for the vertical distances between points and then compute the 166 // values for the vertical distances between points and then compute the
167 // horizontal deltas from those. 167 // horizontal deltas from those.
168 static float GetInverseDiagonalSlope(); 168 static float GetInverseDiagonalSlope();
169 169
170 // Creates an accessible tab label for screen readers that includes the tab
171 // status. This takes the form of "Page title - Tab state".
172 base::string16 GetAccessibleTabLabel();
173
170 private: 174 private:
171 friend class AlertIndicatorButtonTest; 175 friend class AlertIndicatorButtonTest;
172 friend class TabTest; 176 friend class TabTest;
173 friend class TabStripTest; 177 friend class TabStripTest;
174 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabHitTestMaskWhenStacked); 178 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabHitTestMaskWhenStacked);
175 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabCloseButtonVisibilityWhenStacked); 179 FRIEND_TEST_ALL_PREFIXES(TabStripTest, TabCloseButtonVisibilityWhenStacked);
176 180
177 // The animation object used to swap the favicon with the sad tab icon. 181 // The animation object used to swap the favicon with the sad tab icon.
178 class FaviconCrashAnimation; 182 class FaviconCrashAnimation;
179 183
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 366
363 // The favicon for the tab. This might be the sad tab icon or a copy of 367 // The favicon for the tab. This might be the sad tab icon or a copy of
364 // data().favicon and may be modified for theming. It is created on demand 368 // data().favicon and may be modified for theming. It is created on demand
365 // and thus may be null. 369 // and thus may be null.
366 gfx::ImageSkia favicon_; 370 gfx::ImageSkia favicon_;
367 371
368 DISALLOW_COPY_AND_ASSIGN(Tab); 372 DISALLOW_COPY_AND_ASSIGN(Tab);
369 }; 373 };
370 374
371 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ 375 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698