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

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

Issue 2834073004: Refine the layout of omnibox answer suggestions. (Closed)
Patch Set: Created 3 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_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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 void AnimationProgressed(const gfx::Animation* animation) override; 152 void AnimationProgressed(const gfx::Animation* animation) override;
153 153
154 // Returns the offset at which the contents of the |match| should be displayed 154 // Returns the offset at which the contents of the |match| should be displayed
155 // within the text bounds. The directionality of UI and match contents is used 155 // within the text bounds. The directionality of UI and match contents is used
156 // to determine the offset relative to the correct edge. 156 // to determine the offset relative to the correct edge.
157 int GetDisplayOffset(const AutocompleteMatch& match, 157 int GetDisplayOffset(const AutocompleteMatch& match,
158 bool is_ui_rtl, 158 bool is_ui_rtl,
159 bool is_match_contents_rtl) const; 159 bool is_match_contents_rtl) const;
160 160
161 // Returns the font to use for the description line of answer suggestions. 161 // Returns the font to use for the description line of answer suggestions.
162 const gfx::FontList& GetAnswerLineFont() const; 162 const gfx::FontList& GetAnswerFont() const;
163 163
164 // Returns the height of the the description line of answer suggestions. 164 // Returns the height of the the description line of answer suggestions.
165 int GetAnswerLineHeight() const; 165 int GetAnswerLineHeight() const;
166 166
167 // Returns the height of the content line. 167 // Returns the margin that should appear at the top and bottom of the result.
168 int GetContentLineHeight() const; 168 int GetVerticalMargin() const;
169 169
170 // Creates a RenderText with text and styling from the image line. 170 // Creates a RenderText with text and styling from the image line.
171 std::unique_ptr<gfx::RenderText> CreateAnswerLine( 171 std::unique_ptr<gfx::RenderText> CreateAnswerLine(
172 const SuggestionAnswer::ImageLine& line, 172 const SuggestionAnswer::ImageLine& line,
173 const gfx::FontList& font_list) const; 173 const gfx::FontList& font_list) const;
174 174
175 // Adds |text| to |destination|. |text_type| is an index into the 175 // Adds |text| to |destination|. |text_type| is an index into the
176 // kTextStyles constant defined in the .cc file and is used to style the text, 176 // kTextStyles constant defined in the .cc file and is used to style the text,
177 // including setting the font size, color, and baseline style. See the 177 // including setting the font size, color, and baseline style. See the
178 // TextStyle struct in the .cc file for more. 178 // TextStyle struct in the .cc file for more.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 mutable std::unique_ptr<gfx::RenderText> separator_rendertext_; 218 mutable std::unique_ptr<gfx::RenderText> separator_rendertext_;
219 mutable std::unique_ptr<gfx::RenderText> keyword_contents_rendertext_; 219 mutable std::unique_ptr<gfx::RenderText> keyword_contents_rendertext_;
220 mutable std::unique_ptr<gfx::RenderText> keyword_description_rendertext_; 220 mutable std::unique_ptr<gfx::RenderText> keyword_description_rendertext_;
221 221
222 mutable int separator_width_; 222 mutable int separator_width_;
223 223
224 DISALLOW_COPY_AND_ASSIGN(OmniboxResultView); 224 DISALLOW_COPY_AND_ASSIGN(OmniboxResultView);
225 }; 225 };
226 226
227 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_ 227 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698