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_cocoa.h" | 5 #import "chrome/browser/ui/cocoa/find_bar/find_bar_view_cocoa.h" |
6 | 6 |
7 #import "chrome/browser/ui/cocoa/url_drop_target.h" | 7 #import "chrome/browser/ui/cocoa/url_drop_target.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/nsview_additions.h" | 9 #import "ui/base/cocoa/nsview_additions.h" |
10 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 10 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 controlPoint1:NSMakePoint(midRight1.x, bottomLeft.y) | 68 controlPoint1:NSMakePoint(midRight1.x, bottomLeft.y) |
69 controlPoint2:NSMakePoint(midRight1.x, bottomLeft.y)]; | 69 controlPoint2:NSMakePoint(midRight1.x, bottomLeft.y)]; |
70 [path lineToPoint:midRight2]; | 70 [path lineToPoint:midRight2]; |
71 [path curveToPoint:topRight | 71 [path curveToPoint:topRight |
72 controlPoint1:NSMakePoint(midRight2.x, topLeft.y) | 72 controlPoint1:NSMakePoint(midRight2.x, topLeft.y) |
73 controlPoint2:NSMakePoint(midRight2.x, topLeft.y)]; | 73 controlPoint2:NSMakePoint(midRight2.x, topLeft.y)]; |
74 | 74 |
75 { | 75 { |
76 gfx::ScopedNSGraphicsContextSaveGState scopedGState; | 76 gfx::ScopedNSGraphicsContextSaveGState scopedGState; |
77 [path addClip]; | 77 [path addClip]; |
78 [super drawRect:dirtyRect]; | 78 [self drawBackground:dirtyRect]; |
79 } | 79 } |
80 | 80 |
81 [[self strokeColor] set]; | 81 [[self strokeColor] set]; |
82 [path setLineWidth:lineWidth]; | 82 [path setLineWidth:lineWidth]; |
83 [path stroke]; | 83 [path stroke]; |
84 } | 84 } |
85 | 85 |
86 // The findbar is mostly opaque, but has an 8px transparent border on the left | 86 // The findbar is mostly opaque, but has an 8px transparent border on the left |
87 // and right sides (see |kCurveSize|). This is an artifact of the way it is | 87 // and right sides (see |kCurveSize|). This is an artifact of the way it is |
88 // drawn. We override hitTest to return nil for points in this transparent | 88 // drawn. We override hitTest to return nil for points in this transparent |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 return NSDragOperationNone; | 135 return NSDragOperationNone; |
136 } | 136 } |
137 | 137 |
138 // Specifies that mouse events over this view should be ignored by the | 138 // Specifies that mouse events over this view should be ignored by the |
139 // render host. | 139 // render host. |
140 - (BOOL)nonWebContentView { | 140 - (BOOL)nonWebContentView { |
141 return YES; | 141 return YES; |
142 } | 142 } |
143 | 143 |
144 @end | 144 @end |
OLD | NEW |