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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h

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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 6 #define CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void OnSetFocus(bool control_down) override; 118 void OnSetFocus(bool control_down) override;
119 void OnKillFocus() override; 119 void OnKillFocus() override;
120 void OnMouseDown(NSInteger button_number) override; 120 void OnMouseDown(NSInteger button_number) override;
121 bool ShouldSelectAllOnMouseDown() override; 121 bool ShouldSelectAllOnMouseDown() override;
122 122
123 // Helper for LocationBarViewMac. Optionally selects all in |field_|. 123 // Helper for LocationBarViewMac. Optionally selects all in |field_|.
124 void FocusLocation(bool select_all); 124 void FocusLocation(bool select_all);
125 125
126 // Helper to get the font to use in the field, exposed for the 126 // Helper to get the font to use in the field, exposed for the
127 // popup. 127 // popup.
128 // The style parameter specifies the new style for the font, and is a 128 static NSFont* GetNormalFieldFont();
129 // bitmask of the values: BOLD, ITALIC and UNDERLINE (see ui/gfx/font.h). 129 static NSFont* GetBoldFieldFont();
130 static NSFont* GetFieldFont(int style); 130 static NSFont* GetLargeFont();
131 static NSFont* GetLargeFont(int style); 131 static NSFont* GetSmallFont();
132 static NSFont* GetSmallFont(int style);
133 132
134 // If |resource_id| has a PDF image which can be used, return it. 133 // If |resource_id| has a PDF image which can be used, return it.
135 // Otherwise return the PNG image from the resource bundle. 134 // Otherwise return the PNG image from the resource bundle.
136 static NSImage* ImageForResource(int resource_id); 135 static NSImage* ImageForResource(int resource_id);
137 136
138 // Color used to draw suggest text. 137 // Color used to draw suggest text.
139 static NSColor* SuggestTextColor(); 138 static NSColor* SuggestTextColor();
140 139
141 AutocompleteTextField* field() const { return field_; } 140 AutocompleteTextField* field() const { return field_; }
142 141
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 NSRange coalesced_range_update_; 232 NSRange coalesced_range_update_;
234 233
235 // The time of the first character insert operation that has not yet been 234 // The time of the first character insert operation that has not yet been
236 // painted. Used to measure omnibox responsiveness with a histogram. 235 // painted. Used to measure omnibox responsiveness with a histogram.
237 base::TimeTicks insert_char_time_; 236 base::TimeTicks insert_char_time_;
238 237
239 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); 238 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac);
240 }; 239 };
241 240
242 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 241 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.mm ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698