OLD | NEW |
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/find_bar/find_bar_view.h" | 5 #import "chrome/browser/ui/cocoa/find_bar/find_bar_view.h" |
6 | 6 |
7 #import "chrome/browser/ui/cocoa/nsview_additions.h" | 7 #import "chrome/browser/ui/cocoa/nsview_additions.h" |
8 #import "chrome/browser/ui/cocoa/themed_window.h" | 8 #import "chrome/browser/ui/cocoa/themed_window.h" |
9 #import "chrome/browser/ui/cocoa/url_drop_target.h" | 9 #import "chrome/browser/ui/cocoa/url_drop_target.h" |
10 #import "chrome/browser/ui/cocoa/view_id_util.h" | 10 #import "chrome/browser/ui/cocoa/view_id_util.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 [path curveToPoint:topRight | 63 [path curveToPoint:topRight |
64 controlPoint1:NSMakePoint(midRight2.x, topLeft.y) | 64 controlPoint1:NSMakePoint(midRight2.x, topLeft.y) |
65 controlPoint2:NSMakePoint(midRight2.x, topLeft.y)]; | 65 controlPoint2:NSMakePoint(midRight2.x, topLeft.y)]; |
66 | 66 |
67 { | 67 { |
68 gfx::ScopedNSGraphicsContextSaveGState scopedGState; | 68 gfx::ScopedNSGraphicsContextSaveGState scopedGState; |
69 NSGraphicsContext* context = [NSGraphicsContext currentContext]; | 69 NSGraphicsContext* context = [NSGraphicsContext currentContext]; |
70 [path addClip]; | 70 [path addClip]; |
71 | 71 |
72 // Set the pattern phase | 72 // Set the pattern phase |
73 NSPoint phase = [[self window] | 73 NSPoint position = [[self window] |
74 themePatternPhaseForAlignment:THEME_PATTERN_ALIGN_WITH_TAB_STRIP]; | 74 themeImagePositionForAlignment:THEME_IMAGE_ALIGN_WITH_TAB_STRIP]; |
| 75 [context cr_setPatternPhase:position forView:self]; |
75 | 76 |
76 [context cr_setPatternPhase:phase forView:self]; | |
77 [super drawBackgroundWithOpaque:YES]; | 77 [super drawBackgroundWithOpaque:YES]; |
78 } | 78 } |
79 | 79 |
80 [[self strokeColor] set]; | 80 [[self strokeColor] set]; |
81 [path setLineWidth:lineWidth]; | 81 [path setLineWidth:lineWidth]; |
82 [path stroke]; | 82 [path stroke]; |
83 } | 83 } |
84 | 84 |
85 // The findbar is mostly opaque, but has an 8px transparent border on the left | 85 // The findbar is mostly opaque, but has an 8px transparent border on the left |
86 // and right sides (see |kCurveSize|). This is an artifact of the way it is | 86 // and right sides (see |kCurveSize|). This is an artifact of the way it is |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 return VIEW_ID_FIND_IN_PAGE; | 138 return VIEW_ID_FIND_IN_PAGE; |
139 } | 139 } |
140 | 140 |
141 // Specifies that mouse events over this view should be ignored by the | 141 // Specifies that mouse events over this view should be ignored by the |
142 // render host. | 142 // render host. |
143 - (BOOL)nonWebContentView { | 143 - (BOOL)nonWebContentView { |
144 return YES; | 144 return YES; |
145 } | 145 } |
146 | 146 |
147 @end | 147 @end |
OLD | NEW |