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

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

Issue 6326006: [Mac] Organize some files into chrome/browser/ui/cocoa/toolbar/.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "chrome/browser/ui/cocoa/toolbar_view.h"
6
7 #import "chrome/browser/ui/cocoa/themed_window.h"
8 #import "chrome/browser/ui/cocoa/view_id_util.h"
9
10 @implementation ToolbarView
11
12 @synthesize dividerOpacity = dividerOpacity_;
13
14 // Prevent mouse down events from moving the parent window around.
15 - (BOOL)mouseDownCanMoveWindow {
16 return NO;
17 }
18
19 - (void)drawRect:(NSRect)rect {
20 // The toolbar's background pattern is phased relative to the
21 // tab strip view's background pattern.
22 NSPoint phase = [[self window] themePatternPhase];
23 [[NSGraphicsContext currentContext] setPatternPhase:phase];
24 [self drawBackground];
25 }
26
27 // Override of |-[BackgroundGradientView strokeColor]|; make it respect opacity.
28 - (NSColor*)strokeColor {
29 return [[super strokeColor] colorWithAlphaComponent:[self dividerOpacity]];
30 }
31
32 - (BOOL)accessibilityIsIgnored {
33 return NO;
34 }
35
36 - (id)accessibilityAttributeValue:(NSString*)attribute {
37 if ([attribute isEqual:NSAccessibilityRoleAttribute])
38 return NSAccessibilityToolbarRole;
39
40 return [super accessibilityAttributeValue:attribute];
41 }
42
43 - (ViewID)viewID {
44 return VIEW_ID_TOOLBAR;
45 }
46
47 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar_view.h ('k') | chrome/browser/ui/cocoa/toolbar_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698