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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_result_view.h

Issue 2070733002: Update omnibox dropdown selection/hover background drawing for MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scaled_radius
Patch Set: 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_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 const base::string16& text, 181 const base::string16& text,
182 int text_type) const; 182 int text_type) const;
183 183
184 // AppendAnswerText will break up the |text| into bold and non-bold pieces 184 // AppendAnswerText will break up the |text| into bold and non-bold pieces
185 // and pass each to this helper with the correct |is_bold| value. 185 // and pass each to this helper with the correct |is_bold| value.
186 void AppendAnswerTextHelper(gfx::RenderText* destination, 186 void AppendAnswerTextHelper(gfx::RenderText* destination,
187 const base::string16& text, 187 const base::string16& text,
188 int text_type, 188 int text_type,
189 bool is_bold) const; 189 bool is_bold) const;
190 190
191 // Returns the necessary margin, if any, at the start and end of the view.
192 // This allows us to keep the icon and text in the view aligned with the
193 // location bar contents. For a left-to-right language, StartMargin()
194 // and EndMargin() correspond to the left and right margins, respectively.
195 int StartMargin() const;
196 int EndMargin() const;
197
198 static int default_icon_size_; 191 static int default_icon_size_;
199 192
200 // This row's model and model index. 193 // This row's model and model index.
201 OmniboxPopupContentsView* model_; 194 OmniboxPopupContentsView* model_;
202 size_t model_index_; 195 size_t model_index_;
203 196
204 LocationBarView* location_bar_view_; 197 LocationBarView* location_bar_view_;
205 198
206 const gfx::FontList font_list_; 199 const gfx::FontList font_list_;
207 int font_height_; 200 int font_height_;
(...skipping 22 matching lines...) Expand all
230 mutable std::unique_ptr<gfx::RenderText> separator_rendertext_; 223 mutable std::unique_ptr<gfx::RenderText> separator_rendertext_;
231 mutable std::unique_ptr<gfx::RenderText> keyword_contents_rendertext_; 224 mutable std::unique_ptr<gfx::RenderText> keyword_contents_rendertext_;
232 mutable std::unique_ptr<gfx::RenderText> keyword_description_rendertext_; 225 mutable std::unique_ptr<gfx::RenderText> keyword_description_rendertext_;
233 226
234 mutable int separator_width_; 227 mutable int separator_width_;
235 228
236 DISALLOW_COPY_AND_ASSIGN(OmniboxResultView); 229 DISALLOW_COPY_AND_ASSIGN(OmniboxResultView);
237 }; 230 };
238 231
239 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_ 232 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698