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

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: Address Alexei's issues 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 (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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 void OnSetFocus(bool control_down) override; 112 void OnSetFocus(bool control_down) override;
113 void OnKillFocus() override; 113 void OnKillFocus() override;
114 void OnMouseDown(NSInteger button_number) override; 114 void OnMouseDown(NSInteger button_number) override;
115 bool ShouldSelectAllOnMouseDown() override; 115 bool ShouldSelectAllOnMouseDown() override;
116 116
117 // Helper for LocationBarViewMac. Optionally selects all in |field_|. 117 // Helper for LocationBarViewMac. Optionally selects all in |field_|.
118 void FocusLocation(bool select_all); 118 void FocusLocation(bool select_all);
119 119
120 // Helper to get the font to use in the field, exposed for the 120 // Helper to get the font to use in the field, exposed for the
121 // popup. 121 // popup.
122 // The style parameter specifies the new style for the font, and is a 122 static NSFont* GetNormalFieldFont();
123 // bitmask of the values: BOLD, ITALIC and UNDERLINE (see ui/gfx/font.h). 123 static NSFont* GetBoldFieldFont();
124 static NSFont* GetFieldFont(int style); 124 static NSFont* GetLargeFont();
125 static NSFont* GetLargeFont(int style); 125 static NSFont* GetSmallFont();
126 static NSFont* GetSmallFont(int style);
127 126
128 // If |resource_id| has a PDF image which can be used, return it. 127 // If |resource_id| has a PDF image which can be used, return it.
129 // Otherwise return the PNG image from the resource bundle. 128 // Otherwise return the PNG image from the resource bundle.
130 static NSImage* ImageForResource(int resource_id); 129 static NSImage* ImageForResource(int resource_id);
131 130
132 // Color used to draw suggest text. 131 // Color used to draw suggest text.
133 static NSColor* SuggestTextColor(); 132 static NSColor* SuggestTextColor();
134 133
135 AutocompleteTextField* field() const { return field_; } 134 AutocompleteTextField* field() const { return field_; }
136 135
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 NSRange coalesced_range_update_; 223 NSRange coalesced_range_update_;
225 224
226 // The time of the first character insert operation that has not yet been 225 // The time of the first character insert operation that has not yet been
227 // painted. Used to measure omnibox responsiveness with a histogram. 226 // painted. Used to measure omnibox responsiveness with a histogram.
228 base::TimeTicks insert_char_time_; 227 base::TimeTicks insert_char_time_;
229 228
230 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac); 229 DISALLOW_COPY_AND_ASSIGN(OmniboxViewMac);
231 }; 230 };
232 231
233 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_ 232 #endif // CHROME_BROWSER_UI_COCOA_OMNIBOX_OMNIBOX_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698