| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // |description| at offset |x| in the bounds of this view. | 95 // |description| at offset |x| in the bounds of this view. |
| 96 virtual void PaintMatch(const AutocompleteMatch& match, | 96 virtual void PaintMatch(const AutocompleteMatch& match, |
| 97 gfx::RenderText* contents, | 97 gfx::RenderText* contents, |
| 98 gfx::RenderText* description, | 98 gfx::RenderText* description, |
| 99 gfx::Canvas* canvas, | 99 gfx::Canvas* canvas, |
| 100 int x) const; | 100 int x) const; |
| 101 | 101 |
| 102 // Draws given |render_text| on |canvas| at given location (|x|, |y|). | 102 // Draws given |render_text| on |canvas| at given location (|x|, |y|). |
| 103 // |contents| indicates if the |render_text| is for the match contents, | 103 // |contents| indicates if the |render_text| is for the match contents, |
| 104 // separator, or description. Additional properties from |match| are used to | 104 // separator, or description. Additional properties from |match| are used to |
| 105 // render Infinite suggestions correctly. If |max_width| is a non-negative | 105 // render tail suggestions correctly. If |max_width| is a non-negative |
| 106 // number, the text will be elided to fit within |max_width|. Returns the x | 106 // number, the text will be elided to fit within |max_width|. Returns the x |
| 107 // position to the right of the string. | 107 // position to the right of the string. |
| 108 int DrawRenderText(const AutocompleteMatch& match, | 108 int DrawRenderText(const AutocompleteMatch& match, |
| 109 gfx::RenderText* render_text, | 109 gfx::RenderText* render_text, |
| 110 RenderTextType render_text_type, | 110 RenderTextType render_text_type, |
| 111 gfx::Canvas* canvas, | 111 gfx::Canvas* canvas, |
| 112 int x, | 112 int x, |
| 113 int y, | 113 int y, |
| 114 int max_width) const; | 114 int max_width) const; |
| 115 | 115 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_ |
| OLD | NEW |