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