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

Side by Side Diff: chrome/browser/cocoa/download_item_cell.mm

Issue 160237: Redraw download item when its state changed (Closed)
Patch Set: test Created 11 years, 5 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 | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/cocoa/download_item_cell.h" 5 #import "chrome/browser/cocoa/download_item_cell.h"
6 6
7 #include "app/gfx/text_elider.h" 7 #include "app/gfx/text_elider.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/mac_util.h" 9 #include "base/mac_util.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 if (statusText.empty()) { 125 if (statusText.empty()) {
126 // Remove the status text label. 126 // Remove the status text label.
127 [self hideSecondaryTitle]; 127 [self hideSecondaryTitle];
128 isStatusTextVisible_ = NO; 128 isStatusTextVisible_ = NO;
129 } else { 129 } else {
130 // Set status text. 130 // Set status text.
131 NSString* statusString = base::SysWideToNSString(statusText); 131 NSString* statusString = base::SysWideToNSString(statusText);
132 [self setSecondaryTitle:statusString]; 132 [self setSecondaryTitle:statusString];
133 isStatusTextVisible_ = YES; 133 isStatusTextVisible_ = YES;
134 } 134 }
135
136 [[self controlView] setNeedsDisplay:YES];
135 } 137 }
136 138
137 - (void)updateTrackingAreas:(id)sender { 139 - (void)updateTrackingAreas:(id)sender {
138 if (trackingAreaButton_) { 140 if (trackingAreaButton_) {
139 [[self controlView] removeTrackingArea:trackingAreaButton_.get()]; 141 [[self controlView] removeTrackingArea:trackingAreaButton_.get()];
140 trackingAreaButton_.reset(nil); 142 trackingAreaButton_.reset(nil);
141 } 143 }
142 if (trackingAreaDropdown_) { 144 if (trackingAreaDropdown_) {
143 [[self controlView] removeTrackingArea:trackingAreaDropdown_.get()]; 145 [[self controlView] removeTrackingArea:trackingAreaDropdown_.get()];
144 trackingAreaDropdown_.reset(nil); 146 trackingAreaDropdown_.reset(nil);
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 424 }
423 return self; 425 return self;
424 } 426 }
425 427
426 - (void)setCurrentProgress:(NSAnimationProgress)progress { 428 - (void)setCurrentProgress:(NSAnimationProgress)progress {
427 [super setCurrentProgress:progress]; 429 [super setCurrentProgress:progress];
428 [cell_ animationProgressed:progress]; 430 [cell_ animationProgressed:progress];
429 } 431 }
430 432
431 @end 433 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698