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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm

Issue 2407343002: cocoa browser: fix meaning of "continuous pulsing" (Closed)
Patch Set: setIsContinuousPulsing -> setPulseIsStuckOn Created 4 years, 2 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
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/bookmarks/bookmark_button.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 - (BOOL)isFolder { 94 - (BOOL)isFolder {
95 const BookmarkNode* node = [self bookmarkNode]; 95 const BookmarkNode* node = [self bookmarkNode];
96 return (node && node->is_folder()); 96 return (node && node->is_folder());
97 } 97 }
98 98
99 - (BOOL)isEmpty { 99 - (BOOL)isEmpty {
100 return [self bookmarkNode] ? NO : YES; 100 return [self bookmarkNode] ? NO : YES;
101 } 101 }
102 102
103 - (void)setIsContinuousPulsing:(BOOL)flag { 103 - (void)setPulseIsStuckOn:(BOOL)flag {
104 [[self cell] setIsContinuousPulsing:flag]; 104 [[self cell] setPulseIsStuckOn:flag];
105 } 105 }
106 106
107 - (BOOL)isContinuousPulsing { 107 - (BOOL)isPulseStuckOn {
108 return [[self cell] isContinuousPulsing]; 108 return [[self cell] isPulseStuckOn];
109 } 109 }
110 110
111 - (NSPoint)screenLocationForRemoveAnimation { 111 - (NSPoint)screenLocationForRemoveAnimation {
112 NSPoint point; 112 NSPoint point;
113 113
114 if (dragPending_) { 114 if (dragPending_) {
115 // Use the position of the mouse in the drag image as the location. 115 // Use the position of the mouse in the drag image as the location.
116 point = dragEndScreenLocation_; 116 point = dragEndScreenLocation_;
117 point.x += dragMouseOffset_.x; 117 point.x += dragMouseOffset_.x;
118 if ([self isFlipped]) { 118 if ([self isFlipped]) {
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 [[cell clipPathForFrame:bounds inView:self] setClip]; 518 [[cell clipPathForFrame:bounds inView:self] setClip];
519 [cell drawWithFrame:bounds inView:self]; 519 [cell drawWithFrame:bounds inView:self];
520 520
521 CGContextEndTransparencyLayer(cgContext); 521 CGContextEndTransparencyLayer(cgContext);
522 [image unlockFocus]; 522 [image unlockFocus];
523 523
524 return image.autorelease(); 524 return image.autorelease();
525 } 525 }
526 526
527 @end 527 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_button.h ('k') | chrome/browser/ui/cocoa/gradient_button_cell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698