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

Side by Side Diff: chrome/browser/ui/cocoa/download/download_item_button.mm

Issue 900613003: Mac: Make it easier for views to correctly draw with a theme. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gyp
Patch Set: Created 5 years, 10 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/download/download_item_button.h" 5 #import "chrome/browser/ui/cocoa/download/download_item_button.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #import "chrome/browser/ui/cocoa/download/download_item_cell.h" 9 #import "chrome/browser/ui/cocoa/download/download_item_cell.h"
10 #import "chrome/browser/ui/cocoa/download/download_item_controller.h" 10 #import "chrome/browser/ui/cocoa/download/download_item_controller.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // CoreAnimation is enabled. 67 // CoreAnimation is enabled.
68 return YES; 68 return YES;
69 } 69 }
70 70
71 - (void)drawRect:(NSRect)rect { 71 - (void)drawRect:(NSRect)rect {
72 NSView* downloadShelfView = [self ancestorWithViewID:VIEW_ID_DOWNLOAD_SHELF]; 72 NSView* downloadShelfView = [self ancestorWithViewID:VIEW_ID_DOWNLOAD_SHELF];
73 [self cr_drawUsingAncestor:downloadShelfView inRect:rect]; 73 [self cr_drawUsingAncestor:downloadShelfView inRect:rect];
74 [super drawRect:rect]; 74 [super drawRect:rect];
75 } 75 }
76 76
77 // ThemedWindowDrawing implementation.
78
79 - (void)windowDidChangeTheme {
80 [self setNeedsDisplay:YES];
81 }
82
83 - (void)windowDidChangeActive {
84 [self setNeedsDisplay:YES];
85 }
86
77 @end 87 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698