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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.mm

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a lost comment and modify a render text unittest to not test black because of test env font con… Created 4 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/omnibox/omnibox_popup_matrix.h" 5 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/foundation_util.h" 8 #include "base/mac/foundation_util.h"
9 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.h" 9 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.h"
10 #include "chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h" 10 #include "chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 OmniboxPopupViewMac::BackgroundColor(hasDarkTheme_); 145 OmniboxPopupViewMac::BackgroundColor(hasDarkTheme_);
146 [self setBackgroundColor:backgroundColor]; 146 [self setBackgroundColor:backgroundColor];
147 [self setAllowsEmptySelection:YES]; 147 [self setAllowsEmptySelection:YES];
148 [self deselectAll:self]; 148 [self deselectAll:self];
149 149
150 [self resetTrackingArea]; 150 [self resetTrackingArea];
151 151
152 base::scoped_nsobject<NSLayoutManager> layoutManager( 152 base::scoped_nsobject<NSLayoutManager> layoutManager(
153 [[NSLayoutManager alloc] init]); 153 [[NSLayoutManager alloc] init]);
154 answerLineHeight_ = 154 answerLineHeight_ =
155 [layoutManager defaultLineHeightForFont:OmniboxViewMac::GetLargeFont( 155 [layoutManager defaultLineHeightForFont:OmniboxViewMac::GetLargeFont()];
156 gfx::Font::NORMAL)];
157 } 156 }
158 return self; 157 return self;
159 } 158 }
160 159
161 - (OmniboxPopupTableController*)controller { 160 - (OmniboxPopupTableController*)controller {
162 return base::mac::ObjCCastStrict<OmniboxPopupTableController>( 161 return base::mac::ObjCCastStrict<OmniboxPopupTableController>(
163 [self delegate]); 162 [self delegate]);
164 } 163 }
165 164
166 - (void)setObserver:(OmniboxPopupMatrixObserver*)observer { 165 - (void)setObserver:(OmniboxPopupMatrixObserver*)observer {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 [self selectRowIndex:row]; 298 [self selectRowIndex:row];
300 if (row != -1) { 299 if (row != -1) {
301 DCHECK(observer_); 300 DCHECK(observer_);
302 observer_->OnMatrixRowSelected(self, row); 301 observer_->OnMatrixRowSelected(self, row);
303 return YES; 302 return YES;
304 } 303 }
305 return NO; 304 return NO;
306 } 305 }
307 306
308 @end 307 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698