Chromium Code Reviews| 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_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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 const base::string16& text, | 165 const base::string16& text, |
| 166 int text_type); | 166 int text_type); |
| 167 | 167 |
| 168 // AppendAnswerText will break up the |text| into bold and non-bold pieces | 168 // AppendAnswerText will break up the |text| into bold and non-bold pieces |
| 169 // and pass each to this helper with the correct |is_bold| value. | 169 // and pass each to this helper with the correct |is_bold| value. |
| 170 void AppendAnswerTextHelper(gfx::RenderText* destination, | 170 void AppendAnswerTextHelper(gfx::RenderText* destination, |
| 171 const base::string16& text, | 171 const base::string16& text, |
| 172 int text_type, | 172 int text_type, |
| 173 bool is_bold); | 173 bool is_bold); |
| 174 | 174 |
| 175 // Returns the |left_margin_| and |right_margin_| members of | |
| 176 // OmniboxPopupContentsView if browser material design is enabled, and | |
| 177 // returns 0 otherwise. Used when laying out elements inside this view | |
| 178 // to ensure they are rendered within the region directly below the | |
| 179 // location bar. | |
|
Peter Kasting
2015/08/18 19:55:37
Nit: How about:
Returns the necessary margin, if
tdanderson
2015/08/19 17:22:35
Done.
| |
| 180 int LeftOffset() const; | |
| 181 int RightOffset() const; | |
|
Peter Kasting
2015/08/18 19:55:37
I'd use "Margin" instead of "Offset" here, as a ma
tdanderson
2015/08/19 17:22:35
Done.
| |
| 182 | |
| 175 static int default_icon_size_; | 183 static int default_icon_size_; |
| 176 | 184 |
| 177 // This row's model and model index. | 185 // This row's model and model index. |
| 178 OmniboxPopupContentsView* model_; | 186 OmniboxPopupContentsView* model_; |
| 179 size_t model_index_; | 187 size_t model_index_; |
| 180 | 188 |
| 181 LocationBarView* location_bar_view_; | 189 LocationBarView* location_bar_view_; |
| 182 | 190 |
| 183 const gfx::FontList font_list_; | 191 const gfx::FontList font_list_; |
| 184 int font_height_; | 192 int font_height_; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 207 mutable scoped_ptr<gfx::RenderText> separator_rendertext_; | 215 mutable scoped_ptr<gfx::RenderText> separator_rendertext_; |
| 208 mutable scoped_ptr<gfx::RenderText> keyword_contents_rendertext_; | 216 mutable scoped_ptr<gfx::RenderText> keyword_contents_rendertext_; |
| 209 mutable scoped_ptr<gfx::RenderText> keyword_description_rendertext_; | 217 mutable scoped_ptr<gfx::RenderText> keyword_description_rendertext_; |
| 210 | 218 |
| 211 mutable int separator_width_; | 219 mutable int separator_width_; |
| 212 | 220 |
| 213 DISALLOW_COPY_AND_ASSIGN(OmniboxResultView); | 221 DISALLOW_COPY_AND_ASSIGN(OmniboxResultView); |
| 214 }; | 222 }; |
| 215 | 223 |
| 216 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_ | 224 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_ |
| OLD | NEW |