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 necessary margin, if any, at the start and end of the view. | |
| 176 // This allows us to keep the icon and text in the view aligned with the | |
| 177 // location bar contents. | |
| 178 int LeftMargin() const; | |
| 179 int RightMargin() const; | |
|
Peter Kasting
2015/08/24 18:20:00
I suspect the code you now have works for RTL as w
tdanderson
2015/08/24 22:39:16
You're right, it seems to look fine for RTL. Re-na
| |
| 180 | |
| 175 static int default_icon_size_; | 181 static int default_icon_size_; |
| 176 | 182 |
| 177 // This row's model and model index. | 183 // This row's model and model index. |
| 178 OmniboxPopupContentsView* model_; | 184 OmniboxPopupContentsView* model_; |
| 179 size_t model_index_; | 185 size_t model_index_; |
| 180 | 186 |
| 181 LocationBarView* location_bar_view_; | 187 LocationBarView* location_bar_view_; |
| 182 | 188 |
| 183 const gfx::FontList font_list_; | 189 const gfx::FontList font_list_; |
| 184 int font_height_; | 190 int font_height_; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 207 mutable scoped_ptr<gfx::RenderText> separator_rendertext_; | 213 mutable scoped_ptr<gfx::RenderText> separator_rendertext_; |
| 208 mutable scoped_ptr<gfx::RenderText> keyword_contents_rendertext_; | 214 mutable scoped_ptr<gfx::RenderText> keyword_contents_rendertext_; |
| 209 mutable scoped_ptr<gfx::RenderText> keyword_description_rendertext_; | 215 mutable scoped_ptr<gfx::RenderText> keyword_description_rendertext_; |
| 210 | 216 |
| 211 mutable int separator_width_; | 217 mutable int separator_width_; |
| 212 | 218 |
| 213 DISALLOW_COPY_AND_ASSIGN(OmniboxResultView); | 219 DISALLOW_COPY_AND_ASSIGN(OmniboxResultView); |
| 214 }; | 220 }; |
| 215 | 221 |
| 216 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_ | 222 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_ |
| OLD | NEW |