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

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

Issue 9904003: Fix some grammar in chrome/browser/ui/cocoa (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_button.h" 5 #import "chrome/browser/ui/cocoa/hover_button.h"
6 6
7 #import "chrome/browser/ui/cocoa/tracking_area.h" 7 #import "chrome/browser/ui/cocoa/tracking_area.h"
8 8
9 @implementation HoverButton 9 @implementation HoverButton
10 10
(...skipping 23 matching lines...) Expand all
34 self.hoverState = kHoverStateMouseOver; 34 self.hoverState = kHoverStateMouseOver;
35 } 35 }
36 36
37 - (void)mouseExited:(NSEvent*)theEvent { 37 - (void)mouseExited:(NSEvent*)theEvent {
38 self.hoverState = kHoverStateNone; 38 self.hoverState = kHoverStateNone;
39 } 39 }
40 40
41 - (void)mouseDown:(NSEvent*)theEvent { 41 - (void)mouseDown:(NSEvent*)theEvent {
42 self.hoverState = kHoverStateMouseDown; 42 self.hoverState = kHoverStateMouseDown;
43 // The hover button needs to hold onto itself here for a bit. Otherwise, 43 // The hover button needs to hold onto itself here for a bit. Otherwise,
44 // it can be freed while |super mouseDown:| is in it's loop, and the 44 // it can be freed while |super mouseDown:| is in its loop, and the
45 // |checkImageState| call will crash. 45 // |checkImageState| call will crash.
46 // http://crbug.com/28220 46 // http://crbug.com/28220
47 scoped_nsobject<HoverButton> myself([self retain]); 47 scoped_nsobject<HoverButton> myself([self retain]);
48 48
49 [super mouseDown:theEvent]; 49 [super mouseDown:theEvent];
50 // We need to check the image state after the mouseDown event loop finishes. 50 // We need to check the image state after the mouseDown event loop finishes.
51 // It's possible that we won't get a mouseExited event if the button was 51 // It's possible that we won't get a mouseExited event if the button was
52 // moved under the mouse during tab resize, instead of the mouse moving over 52 // moved under the mouse during tab resize, instead of the mouse moving over
53 // the button. 53 // the button.
54 // http://crbug.com/31279 54 // http://crbug.com/31279
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 self.hoverState = NSPointInRect(mouseLoc, [self bounds]) ? 98 self.hoverState = NSPointInRect(mouseLoc, [self bounds]) ?
99 kHoverStateMouseOver : kHoverStateNone; 99 kHoverStateMouseOver : kHoverStateNone;
100 } 100 }
101 101
102 - (void)setHoverState:(HoverState)state { 102 - (void)setHoverState:(HoverState)state {
103 hoverState_ = state; 103 hoverState_ = state;
104 [self setNeedsDisplay:YES]; 104 [self setNeedsDisplay:YES];
105 } 105 }
106 106
107 @end 107 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/content_settings/cookie_details.h ('k') | chrome/browser/ui/cocoa/image_button_cell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698