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

Side by Side Diff: chrome/browser/ui/cocoa/find_bar/find_bar_view.mm

Issue 469003006: Remove --disable-core-animation flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@erikchen_patch
Patch Set: Created 6 years, 4 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/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"
11 #import "ui/base/cocoa/nsgraphics_context_additions.h" 11 #import "ui/base/cocoa/nsgraphics_context_additions.h"
12 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" 12 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
13 13
14 namespace { 14 namespace {
15 CGFloat kCurveSize = 8; 15 CGFloat kCurveSize = 8;
16 } // end namespace 16 } // end namespace
17 17
18 @implementation FindBarView 18 @implementation FindBarView
19 19
20 - (id)initWithFrame:(NSRect)frame { 20 - (id)initWithFrame:(NSRect)frame {
21 if ((self = [super initWithFrame:frame])) { 21 if ((self = [super initWithFrame:frame])) {
22 // Give this view its own layer so that it can appear over the web contents 22 // Give this view its own layer so that it can appear over the web contents
23 // view's layer. Layer squashing is not necessary for this view because 23 // view's layer. Layer squashing is not helpful for this view because
24 // NSTextField will correctly anti-alias text on 10.8 and beyond. 24 // NSTextField will correctly anti-alias text on 10.8 and beyond.
25 [self cr_setWantsLayer:YES]; 25 [self setWantsLayer:YES];
26 } 26 }
27 return self; 27 return self;
28 } 28 }
29 29
30 - (void)awakeFromNib { 30 - (void)awakeFromNib {
31 // Register for all the drag types handled by the RWHVCocoa. 31 // Register for all the drag types handled by the RWHVCocoa.
32 [self registerForDraggedTypes:[URLDropTargetHandler handledDragTypes]]; 32 [self registerForDraggedTypes:[URLDropTargetHandler handledDragTypes]];
33 } 33 }
34 34
35 - (void)drawRect:(NSRect)rect { 35 - (void)drawRect:(NSRect)rect {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return NSDragOperationNone; 144 return NSDragOperationNone;
145 } 145 }
146 146
147 // Specifies that mouse events over this view should be ignored by the 147 // Specifies that mouse events over this view should be ignored by the
148 // render host. 148 // render host.
149 - (BOOL)nonWebContentView { 149 - (BOOL)nonWebContentView {
150 return YES; 150 return YES;
151 } 151 }
152 152
153 @end 153 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698