| Index: chrome/browser/ui/views/autocomplete/autocomplete_result_view.h
|
| diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_result_view.h b/chrome/browser/ui/views/autocomplete/autocomplete_result_view.h
|
| index 3b9a6b73f2a317b3a4219102a8ac8485ec734a72..a8e7673633d4d073b7956f691b437eeef6bbe3c4 100644
|
| --- a/chrome/browser/ui/views/autocomplete/autocomplete_result_view.h
|
| +++ b/chrome/browser/ui/views/autocomplete/autocomplete_result_view.h
|
| @@ -44,6 +44,10 @@ class AutocompleteResultView : public views::View {
|
| // the match so that we can continue to paint the last result even after the
|
| // model has changed.
|
| void set_match(const AutocompleteMatch& match) { match_ = match; }
|
| + const gfx::Font& normal_font() const { return normal_font_; }
|
| + const gfx::Font& bold_font() const { return bold_font_; }
|
| + const gfx::Rect& text_bounds() const { return text_bounds_; }
|
| + void set_text_bounds(const gfx::Rect& tb) { text_bounds_ = tb; }
|
|
|
| // Overridden from views::View:
|
| virtual void OnPaint(gfx::Canvas* canvas);
|
| @@ -54,12 +58,24 @@ class AutocompleteResultView : public views::View {
|
| int GetPreferredHeight(const gfx::Font& font,
|
| const gfx::Font& bold_font);
|
| static SkColor GetColor(ResultViewState state, ColorKind kind);
|
| + static int icon_size() { return icon_size_; }
|
|
|
| protected:
|
| virtual void PaintMatch(gfx::Canvas* canvas,
|
| const AutocompleteMatch& match,
|
| int x);
|
|
|
| + // Draws the specified |text| into the canvas, using highlighting provided by
|
| + // |classifications|. If |force_dim| is true, ACMatchClassification::DIM is
|
| + // added to all of the classifications. Returns the x position to the right
|
| + // of the string.
|
| + int DrawString(gfx::Canvas* canvas,
|
| + const string16& text,
|
| + const ACMatchClassifications& classifications,
|
| + bool force_dim,
|
| + int x,
|
| + int y);
|
| +
|
| int icon_vertical_padding_;
|
| int text_vertical_padding_;
|
|
|
| @@ -92,21 +108,12 @@ class AutocompleteResultView : public views::View {
|
| static bool SortRunsLogically(const RunData& lhs, const RunData& rhs);
|
| static bool SortRunsVisually(const RunData& lhs, const RunData& rhs);
|
|
|
| + static int icon_size_;
|
| +
|
| ResultViewState GetState() const;
|
|
|
| const SkBitmap* GetIcon() const;
|
|
|
| - // Draws the specified |text| into the canvas, using highlighting provided by
|
| - // |classifications|. If |force_dim| is true, ACMatchClassification::DIM is
|
| - // added to all of the classifications. Returns the x position to the right
|
| - // of the string.
|
| - int DrawString(gfx::Canvas* canvas,
|
| - const string16& text,
|
| - const ACMatchClassifications& classifications,
|
| - bool force_dim,
|
| - int x,
|
| - int y);
|
| -
|
| // Elides |runs| to fit in |remaining_width|. The runs in |runs| should be in
|
| // logical order.
|
| //
|
| @@ -141,8 +148,6 @@ class AutocompleteResultView : public views::View {
|
| gfx::Rect icon_bounds_;
|
| gfx::Rect text_bounds_;
|
|
|
| - static int icon_size_;
|
| -
|
| AutocompleteMatch match_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AutocompleteResultView);
|
|
|