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

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

Issue 904503003: Mac: Make more views adopts ThemedWindowDrawing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FramedBrowserWindow
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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/new_tab_button.h" 5 #import "chrome/browser/ui/cocoa/new_tab_button.h"
6 #import "chrome/browser/ui/cocoa/image_button_cell.h" 6 #import "chrome/browser/ui/cocoa/image_button_cell.h"
7 #include "grit/theme_resources.h" 7 #include "grit/theme_resources.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 9
10 // A simple override of the ImageButtonCell to disable handling of 10 // A simple override of the ImageButtonCell to disable handling of
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 // Override to only accept clicks within the bounds of the defined path, not 50 // Override to only accept clicks within the bounds of the defined path, not
51 // the entire bounding box. |aPoint| is in the superview's coordinate system. 51 // the entire bounding box. |aPoint| is in the superview's coordinate system.
52 - (NSView*)hitTest:(NSPoint)aPoint { 52 - (NSView*)hitTest:(NSPoint)aPoint {
53 if ([self pointIsOverButton:aPoint]) 53 if ([self pointIsOverButton:aPoint])
54 return [super hitTest:aPoint]; 54 return [super hitTest:aPoint];
55 return nil; 55 return nil;
56 } 56 }
57 57
58 // ThemedWindowDrawing implementation.
59
60 - (void)windowDidChangeTheme {
61 [self setNeedsDisplay:YES];
62 }
63
64 - (void)windowDidChangeActive {
65 [self setNeedsDisplay:YES];
66 }
67
58 @end 68 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/new_tab_button.h ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_background_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698