| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 const gfx::Rect& text_bounds() const { return text_bounds_; } | 112 const gfx::Rect& text_bounds() const { return text_bounds_; } |
| 113 | 113 |
| 114 void set_edge_item_padding(int value) { edge_item_padding_ = value; } | 114 void set_edge_item_padding(int value) { edge_item_padding_ = value; } |
| 115 void set_item_padding(int value) { item_padding_ = value; } | 115 void set_item_padding(int value) { item_padding_ = value; } |
| 116 void set_minimum_text_vertical_padding(int value) { | 116 void set_minimum_text_vertical_padding(int value) { |
| 117 minimum_text_vertical_padding_ = value; | 117 minimum_text_vertical_padding_ = value; |
| 118 } | 118 } |
| 119 | 119 |
| 120 private: | 120 private: |
| 121 // Common initialization code of the colors returned by GetColors(). | |
| 122 static void CommonInitColors(const ui::NativeTheme* theme, | |
| 123 SkColor colors[][NUM_KINDS]); | |
| 124 | |
| 125 gfx::ImageSkia GetIcon() const; | 121 gfx::ImageSkia GetIcon() const; |
| 126 const gfx::ImageSkia* GetKeywordIcon() const; | 122 const gfx::ImageSkia* GetKeywordIcon() const; |
| 127 | 123 |
| 128 // Whether to render only the keyword match. Returns true if |match_| has an | 124 // Whether to render only the keyword match. Returns true if |match_| has an |
| 129 // associated keyword match that has been animated so close to the start that | 125 // associated keyword match that has been animated so close to the start that |
| 130 // the keyword match will hide even the icon of the regular match. | 126 // the keyword match will hide even the icon of the regular match. |
| 131 bool ShowOnlyKeywordMatch() const; | 127 bool ShowOnlyKeywordMatch() const; |
| 132 | 128 |
| 133 // Resets all RenderTexts for contents and description of the |match_| and its | 129 // Resets all RenderTexts for contents and description of the |match_| and its |
| 134 // associated keyword match. | 130 // associated keyword match. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 mutable scoped_ptr<gfx::RenderText> separator_rendertext_; | 185 mutable scoped_ptr<gfx::RenderText> separator_rendertext_; |
| 190 mutable scoped_ptr<gfx::RenderText> keyword_contents_rendertext_; | 186 mutable scoped_ptr<gfx::RenderText> keyword_contents_rendertext_; |
| 191 mutable scoped_ptr<gfx::RenderText> keyword_description_rendertext_; | 187 mutable scoped_ptr<gfx::RenderText> keyword_description_rendertext_; |
| 192 | 188 |
| 193 mutable int separator_width_; | 189 mutable int separator_width_; |
| 194 | 190 |
| 195 DISALLOW_COPY_AND_ASSIGN(OmniboxResultView); | 191 DISALLOW_COPY_AND_ASSIGN(OmniboxResultView); |
| 196 }; | 192 }; |
| 197 | 193 |
| 198 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_ | 194 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_ |
| OLD | NEW |