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

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

Issue 3042014: Conditionally draw a bezel below text fields, used for the omnibox.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/cocoa/styled_text_field_cell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/location_bar/autocomplete_text_field_cell.h" 5 #import "chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "chrome/browser/cocoa/image_utils.h" 8 #import "chrome/browser/cocoa/image_utils.h"
9 #import "chrome/browser/cocoa/location_bar/autocomplete_text_field.h" 9 #import "chrome/browser/cocoa/location_bar/autocomplete_text_field.h"
10 #import "chrome/browser/cocoa/location_bar/location_bar_decoration.h" 10 #import "chrome/browser/cocoa/location_bar/location_bar_decoration.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 @implementation AutocompleteTextFieldCell 141 @implementation AutocompleteTextFieldCell
142 142
143 - (CGFloat)baselineAdjust { 143 - (CGFloat)baselineAdjust {
144 return kBaselineAdjust; 144 return kBaselineAdjust;
145 } 145 }
146 146
147 - (CGFloat)cornerRadius { 147 - (CGFloat)cornerRadius {
148 return kCornerRadius; 148 return kCornerRadius;
149 } 149 }
150 150
151 - (BOOL)shouldDrawBezel {
152 return YES;
153 }
154
151 - (void)clearDecorations { 155 - (void)clearDecorations {
152 leftDecorations_.clear(); 156 leftDecorations_.clear();
153 rightDecorations_.clear(); 157 rightDecorations_.clear();
154 } 158 }
155 159
156 - (void)addLeftDecoration:(LocationBarDecoration*)decoration { 160 - (void)addLeftDecoration:(LocationBarDecoration*)decoration {
157 leftDecorations_.push_back(decoration); 161 leftDecorations_.push_back(decoration);
158 } 162 }
159 163
160 - (void)addRightDecoration:(LocationBarDecoration*)decoration { 164 - (void)addRightDecoration:(LocationBarDecoration*)decoration {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 &decorations, &decorationFrames, &textFrame); 392 &decorations, &decorationFrames, &textFrame);
389 393
390 for (size_t i = 0; i < decorations.size(); ++i) { 394 for (size_t i = 0; i < decorations.size(); ++i) {
391 NSString* tooltip = decorations[i]->GetToolTip(); 395 NSString* tooltip = decorations[i]->GetToolTip();
392 if ([tooltip length] > 0) 396 if ([tooltip length] > 0)
393 [controlView addToolTip:tooltip forRect:decorationFrames[i]]; 397 [controlView addToolTip:tooltip forRect:decorationFrames[i]];
394 } 398 }
395 } 399 }
396 400
397 @end 401 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cocoa/styled_text_field_cell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698