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

Side by Side Diff: chrome/browser/ui/cocoa/hover_close_button.mm

Issue 588393002: Mac: Fix tab view accessibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for Avi Created 6 years, 3 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 | « no previous file | chrome/browser/ui/cocoa/tabs/tab_strip_view.mm » ('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 #import "chrome/browser/ui/cocoa/hover_close_button.h" 5 #import "chrome/browser/ui/cocoa/hover_close_button.h"
6 6
7 #include "chrome/grit/generated_resources.h" 7 #include "chrome/grit/generated_resources.h"
8 #include "grit/theme_resources.h" 8 #include "grit/theme_resources.h"
9 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMKeyValueAnimation.h" 9 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMKeyValueAnimation.h"
10 #include "ui/base/cocoa/animation_utils.h" 10 #include "ui/base/cocoa/animation_utils.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // which will clean up the animation. 177 // which will clean up the animation.
178 [fadeOutAnimation_ stopAnimation]; 178 [fadeOutAnimation_ stopAnimation];
179 } 179 }
180 } 180 }
181 } 181 }
182 182
183 - (void)commonInit { 183 - (void)commonInit {
184 // Set accessibility description. 184 // Set accessibility description.
185 NSCell* cell = [self cell]; 185 NSCell* cell = [self cell];
186 [cell accessibilitySetOverrideValue:gDescription 186 [cell accessibilitySetOverrideValue:gDescription
187 forAttribute:NSAccessibilityDescriptionAttribute]; 187 forAttribute:NSAccessibilityTitleAttribute];
188 188
189 // Add a tooltip. Using 'owner:self' means that 189 // Add a tooltip. Using 'owner:self' means that
190 // -view:stringForToolTip:point:userData: will be called to provide the 190 // -view:stringForToolTip:point:userData: will be called to provide the
191 // tooltip contents immediately before showing it. 191 // tooltip contents immediately before showing it.
192 [self addToolTipRect:[self bounds] owner:self userData:NULL]; 192 [self addToolTipRect:[self bounds] owner:self userData:NULL];
193 193
194 // Initialize previousState. 194 // Initialize previousState.
195 previousState_ = kHoverStateNone; 195 previousState_ = kHoverStateNone;
196 } 196 }
197 197
(...skipping 30 matching lines...) Expand all
228 break; 228 break;
229 case kHoverStateMouseDown: 229 case kHoverStateMouseDown:
230 imageID = IDR_CLOSE_DIALOG_P; 230 imageID = IDR_CLOSE_DIALOG_P;
231 break; 231 break;
232 } 232 }
233 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 233 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
234 return bundle.GetNativeImageNamed(imageID).ToNSImage(); 234 return bundle.GetNativeImageNamed(imageID).ToNSImage();
235 } 235 }
236 236
237 @end 237 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tabs/tab_strip_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698