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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 [path lineToPoint:bottomRight]; | 57 [path lineToPoint:bottomRight]; |
58 [path curveToPoint:midRight1 | 58 [path curveToPoint:midRight1 |
59 controlPoint1:NSMakePoint(midRight1.x, bottomLeft.y) | 59 controlPoint1:NSMakePoint(midRight1.x, bottomLeft.y) |
60 controlPoint2:NSMakePoint(midRight1.x, bottomLeft.y)]; | 60 controlPoint2:NSMakePoint(midRight1.x, bottomLeft.y)]; |
61 [path lineToPoint:midRight2]; | 61 [path lineToPoint:midRight2]; |
62 [path curveToPoint:topRight | 62 [path curveToPoint:topRight |
63 controlPoint1:NSMakePoint(midRight2.x, topLeft.y) | 63 controlPoint1:NSMakePoint(midRight2.x, topLeft.y) |
64 controlPoint2:NSMakePoint(midRight2.x, topLeft.y)]; | 64 controlPoint2:NSMakePoint(midRight2.x, topLeft.y)]; |
65 | 65 |
66 { | 66 { |
| 67 gfx::ScopedNSGraphicsContextSaveGState scopedGState; |
67 NSGraphicsContext* context = [NSGraphicsContext currentContext]; | 68 NSGraphicsContext* context = [NSGraphicsContext currentContext]; |
68 gfx::ScopedNSGraphicsContextSaveGState scopedGState(context); | |
69 [path addClip]; | 69 [path addClip]; |
70 | 70 |
71 // Set the pattern phase | 71 // Set the pattern phase |
72 NSPoint phase = [[self window] themePatternPhase]; | 72 NSPoint phase = [[self window] themePatternPhase]; |
73 | 73 |
74 [context setPatternPhase:phase]; | 74 [context setPatternPhase:phase]; |
75 [super drawBackgroundWithOpaque:YES]; | 75 [super drawBackgroundWithOpaque:YES]; |
76 } | 76 } |
77 | 77 |
78 [[self strokeColor] set]; | 78 [[self strokeColor] set]; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 return VIEW_ID_FIND_IN_PAGE; | 136 return VIEW_ID_FIND_IN_PAGE; |
137 } | 137 } |
138 | 138 |
139 // Specifies that mouse events over this view should be ignored by the | 139 // Specifies that mouse events over this view should be ignored by the |
140 // render host. | 140 // render host. |
141 - (BOOL)nonWebContentView { | 141 - (BOOL)nonWebContentView { |
142 return YES; | 142 return YES; |
143 } | 143 } |
144 | 144 |
145 @end | 145 @end |
OLD | NEW |