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" |
| 11 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h" | 11 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h" |
| 12 #include "components/omnibox/autocomplete_match.h" | 12 #include "components/omnibox/autocomplete_match.h" |
| 13 #include "components/omnibox/suggestion_answer.h" | |
| 14 #include "third_party/skia/include/core/SkColor.h" | 13 #include "third_party/skia/include/core/SkColor.h" |
| 15 #include "ui/gfx/animation/animation_delegate.h" | 14 #include "ui/gfx/animation/animation_delegate.h" |
| 16 #include "ui/gfx/animation/slide_animation.h" | 15 #include "ui/gfx/animation/slide_animation.h" |
| 17 #include "ui/gfx/font_list.h" | 16 #include "ui/gfx/font_list.h" |
| 18 #include "ui/gfx/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
| 19 #include "ui/views/controls/image_view.h" | 18 #include "ui/views/controls/image_view.h" |
| 20 #include "ui/views/view.h" | 19 #include "ui/views/view.h" |
| 21 | 20 |
| 22 class LocationBarView; | 21 class LocationBarView; |
| 23 class OmniboxPopupContentsView; | 22 class OmniboxPopupContentsView; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 // Returns the offset at which the contents of the |match| should be displayed | 152 // Returns the offset at which the contents of the |match| should be displayed |
| 154 // within the text bounds. The directionality of UI and match contents is used | 153 // within the text bounds. The directionality of UI and match contents is used |
| 155 // to determine the offset relative to the correct edge. | 154 // to determine the offset relative to the correct edge. |
| 156 int GetDisplayOffset(const AutocompleteMatch& match, | 155 int GetDisplayOffset(const AutocompleteMatch& match, |
| 157 bool is_ui_rtl, | 156 bool is_ui_rtl, |
| 158 bool is_match_contents_rtl) const; | 157 bool is_match_contents_rtl) const; |
| 159 | 158 |
| 160 int GetAnswerLineHeight() const; | 159 int GetAnswerLineHeight() const; |
| 161 int GetContentLineHeight() const; | 160 int GetContentLineHeight() const; |
| 162 | 161 |
| 163 void AppendAnswerText(const SuggestionAnswer::TextField& text_field); | 162 // Adds styled text to |description_rendertext_|. |
|
Peter Kasting
2015/03/24 01:05:35
Nit: Can you flesh this out more? How is the text
dschuyler
2015/03/24 01:26:47
Thanks!
Done.
| |
| 163 void AppendAnswerText(const base::string16& text, int text_type); | |
|
Peter Kasting
2015/03/24 01:05:35
Nit: |text_style| might be a better name for this
dschuyler
2015/03/24 01:26:47
I call the TextStyle instance text_style in the sa
Peter Kasting
2015/03/24 01:44:56
Fair enough, but this highlights for me that there
dschuyler
2015/03/24 02:20:10
Done.
| |
| 164 | 164 |
| 165 static int default_icon_size_; | 165 static int default_icon_size_; |
| 166 | 166 |
| 167 // Default values cached here, may be overridden using the setters above. | 167 // Default values cached here, may be overridden using the setters above. |
| 168 int edge_item_padding_; | 168 int edge_item_padding_; |
| 169 int item_padding_; | 169 int item_padding_; |
| 170 | 170 |
| 171 // This row's model and model index. | 171 // This row's model and model index. |
| 172 OmniboxPopupContentsView* model_; | 172 OmniboxPopupContentsView* model_; |
| 173 size_t model_index_; | 173 size_t model_index_; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 mutable scoped_ptr<gfx::RenderText> keyword_description_rendertext_; | 207 mutable scoped_ptr<gfx::RenderText> keyword_description_rendertext_; |
| 208 | 208 |
| 209 mutable int separator_width_; | 209 mutable int separator_width_; |
| 210 | 210 |
| 211 base::WeakPtrFactory<OmniboxResultView> weak_ptr_factory_; | 211 base::WeakPtrFactory<OmniboxResultView> weak_ptr_factory_; |
| 212 | 212 |
| 213 DISALLOW_COPY_AND_ASSIGN(OmniboxResultView); | 213 DISALLOW_COPY_AND_ASSIGN(OmniboxResultView); |
| 214 }; | 214 }; |
| 215 | 215 |
| 216 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_ | 216 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_ |
| OLD | NEW |