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

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: A tiny fix for the ResourceBundle... Created 4 years, 8 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 [self setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleNone]; 134 [self setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleNone];
135 [self setBackgroundColor:[NSColor controlBackgroundColor]]; 135 [self setBackgroundColor:[NSColor controlBackgroundColor]];
136 [self setAllowsEmptySelection:YES]; 136 [self setAllowsEmptySelection:YES];
137 [self deselectAll:self]; 137 [self deselectAll:self];
138 138
139 [self resetTrackingArea]; 139 [self resetTrackingArea];
140 140
141 base::scoped_nsobject<NSLayoutManager> layoutManager( 141 base::scoped_nsobject<NSLayoutManager> layoutManager(
142 [[NSLayoutManager alloc] init]); 142 [[NSLayoutManager alloc] init]);
143 answerLineHeight_ = 143 answerLineHeight_ =
144 [layoutManager defaultLineHeightForFont:OmniboxViewMac::GetLargeFont( 144 [layoutManager defaultLineHeightForFont:OmniboxViewMac::GetLargeFont()];
145 gfx::Font::NORMAL)];
146 } 145 }
147 return self; 146 return self;
148 } 147 }
149 148
150 - (OmniboxPopupTableController*)controller { 149 - (OmniboxPopupTableController*)controller {
151 return base::mac::ObjCCastStrict<OmniboxPopupTableController>( 150 return base::mac::ObjCCastStrict<OmniboxPopupTableController>(
152 [self delegate]); 151 [self delegate]);
153 } 152 }
154 153
155 - (void)setObserver:(OmniboxPopupMatrixObserver*)observer { 154 - (void)setObserver:(OmniboxPopupMatrixObserver*)observer {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 [self selectRowIndex:row]; 287 [self selectRowIndex:row];
289 if (row != -1) { 288 if (row != -1) {
290 DCHECK(observer_); 289 DCHECK(observer_);
291 observer_->OnMatrixRowSelected(self, row); 290 observer_->OnMatrixRowSelected(self, row);
292 return YES; 291 return YES;
293 } 292 }
294 return NO; 293 return NO;
295 } 294 }
296 295
297 @end 296 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698