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

Side by Side Diff: chrome/browser/ui/cocoa/download/download_show_all_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_show_all_button.h" 5 #import "chrome/browser/ui/cocoa/download/download_show_all_button.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "chrome/browser/ui/cocoa/download/download_show_all_cell.h" 8 #import "chrome/browser/ui/cocoa/download/download_show_all_cell.h"
9 #import "chrome/browser/ui/cocoa/view_id_util.h" 9 #import "chrome/browser/ui/cocoa/view_id_util.h"
10 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
(...skipping 30 matching lines...) Expand all
41 // CoreAnimation is enabled. 41 // CoreAnimation is enabled.
42 return YES; 42 return YES;
43 } 43 }
44 44
45 - (void)drawRect:(NSRect)rect { 45 - (void)drawRect:(NSRect)rect {
46 NSView* downloadShelfView = [self ancestorWithViewID:VIEW_ID_DOWNLOAD_SHELF]; 46 NSView* downloadShelfView = [self ancestorWithViewID:VIEW_ID_DOWNLOAD_SHELF];
47 [self cr_drawUsingAncestor:downloadShelfView inRect:rect]; 47 [self cr_drawUsingAncestor:downloadShelfView inRect:rect];
48 [super drawRect:rect]; 48 [super drawRect:rect];
49 } 49 }
50 50
51 // ThemedWindowDrawing implementation.
52
53 - (void)windowDidChangeTheme {
54 [self setNeedsDisplay:YES];
55 }
56
57 - (void)windowDidChangeActive {
58 [self setNeedsDisplay:YES];
59 }
60
51 @end 61 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698