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

Side by Side Diff: chrome/browser/cocoa/autocomplete_text_field_cell.mm

Issue 178007: [Mac] Tweaks to Omnibox metrics. (Closed)
Patch Set: Oops, fixed unit test. Created 11 years, 3 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) 2009 The Chromium Authors. All rights reserved. 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 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/cocoa/autocomplete_text_field_cell.h" 5 #import "chrome/browser/cocoa/autocomplete_text_field_cell.h"
6 6
7 #import "base/logging.h" 7 #import "base/logging.h"
8 #import "third_party/GTM/AppKit/GTMTheme.h" 8 #import "third_party/GTM/AppKit/GTMTheme.h"
9 9
10 namespace { 10 namespace {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 fieldEditorNeedsReset_ = YES; 155 fieldEditorNeedsReset_ = YES;
156 } 156 }
157 } 157 }
158 158
159 - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView { 159 - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView {
160 DCHECK([controlView isFlipped]); 160 DCHECK([controlView isFlipped]);
161 [[NSColor colorWithCalibratedWhite:1.0 alpha:0.25] set]; 161 [[NSColor colorWithCalibratedWhite:1.0 alpha:0.25] set];
162 NSFrameRectWithWidthUsingOperation(cellFrame, 1, NSCompositeSourceOver); 162 NSFrameRectWithWidthUsingOperation(cellFrame, 1, NSCompositeSourceOver);
163 163
164 // TODO(shess): This inset is also reflected in ToolbarController
165 // -autocompletePopupPosition.
164 NSRect frame = NSInsetRect(cellFrame, 0, 1); 166 NSRect frame = NSInsetRect(cellFrame, 0, 1);
165 [[self backgroundColor] setFill]; 167 [[self backgroundColor] setFill];
166 NSRect innerFrame = NSInsetRect(frame, 1, 1); 168 NSRect innerFrame = NSInsetRect(frame, 1, 1);
167 NSRectFill(innerFrame); 169 NSRectFill(innerFrame);
168 170
169 NSRect shadowFrame, restFrame; 171 NSRect shadowFrame, restFrame;
170 NSDivideRect(innerFrame, &shadowFrame, &restFrame, 1, NSMinYEdge); 172 NSDivideRect(innerFrame, &shadowFrame, &restFrame, 1, NSMinYEdge);
171 173
172 BOOL isMainWindow = [[controlView window] isMainWindow]; 174 BOOL isMainWindow = [[controlView window] isMainWindow];
173 GTMTheme *theme = [controlView gtm_theme]; 175 GTMTheme *theme = [controlView gtm_theme];
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 start:(NSInteger)selStart 294 start:(NSInteger)selStart
293 length:(NSInteger)selLength { 295 length:(NSInteger)selLength {
294 [super selectWithFrame:[self textFrameForFrame:cellFrame] 296 [super selectWithFrame:[self textFrameForFrame:cellFrame]
295 inView:controlView editor:textObj 297 inView:controlView editor:textObj
296 delegate:anObject 298 delegate:anObject
297 start:selStart 299 start:selStart
298 length:selLength]; 300 length:selLength];
299 } 301 }
300 302
301 @end 303 @end
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_popup_view_mac.mm ('k') | chrome/browser/cocoa/toolbar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698