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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_view_cocoa.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) 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/toolbar/toolbar_view_cocoa.h" 5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_view_cocoa.h"
6 6
7 #import "chrome/browser/ui/cocoa/themed_window.h" 7 #import "chrome/browser/ui/cocoa/themed_window.h"
8 #import "chrome/browser/ui/cocoa/view_id_util.h" 8 #import "chrome/browser/ui/cocoa/view_id_util.h"
9 #import "ui/base/cocoa/nsgraphics_context_additions.h" 9 #import "ui/base/cocoa/nsgraphics_context_additions.h"
10 #import "ui/base/cocoa/nsview_additions.h"
10 11
11 @implementation ToolbarView 12 @implementation ToolbarView
12 13
13 @synthesize dividerOpacity = dividerOpacity_; 14 @synthesize dividerOpacity = dividerOpacity_;
14 15
15 // Prevent mouse down events from moving the parent window around. 16 // Prevent mouse down events from moving the parent window around.
16 - (BOOL)mouseDownCanMoveWindow { 17 - (BOOL)mouseDownCanMoveWindow {
17 return NO; 18 return NO;
18 } 19 }
19 20
(...skipping 21 matching lines...) Expand all
41 } 42 }
42 43
43 - (ViewID)viewID { 44 - (ViewID)viewID {
44 return VIEW_ID_TOOLBAR; 45 return VIEW_ID_TOOLBAR;
45 } 46 }
46 47
47 - (BOOL)isOpaque { 48 - (BOOL)isOpaque {
48 return YES; 49 return YES;
49 } 50 }
50 51
52 // ThemedWindowDrawing overrides.
53
54 - (void)windowDidChangeActive {
55 // Need to redraw the omnibox and toolbar buttons as well.
56 [self cr_recursivelySetNeedsDisplay:YES];
Andre 2015/02/03 19:20:37 This used to be done by BackgroundGradientView.
57 }
58
Avi (use Gerrit) 2015/02/03 21:53:34 Don't you need -windowDidChangeTheme too? In Brows
Andre 2015/02/03 22:34:16 -windowDidChangeTheme is a required method on a fo
51 @end 59 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698