Chromium Code Reviews| Index: chrome/browser/ui/views/autocomplete/autocomplete_result_view.h |
| =================================================================== |
| --- chrome/browser/ui/views/autocomplete/autocomplete_result_view.h (revision 80563) |
| +++ chrome/browser/ui/views/autocomplete/autocomplete_result_view.h (working copy) |
| @@ -6,8 +6,11 @@ |
| #define CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_RESULT_VIEW_H_ |
| #pragma once |
| +#include "base/memory/ref_counted.h" |
| #include "chrome/browser/autocomplete/autocomplete_match.h" |
| #include "third_party/skia/include/core/SkColor.h" |
| +#include "ui/base/animation/animation_delegate.h" |
| +#include "ui/base/animation/slide_animation.h" |
| #include "ui/gfx/font.h" |
| #include "ui/gfx/rect.h" |
| #include "views/view.h" |
| @@ -17,7 +20,8 @@ |
| class Canvas; |
| } |
| -class AutocompleteResultView : public views::View { |
| +class AutocompleteResultView : public views::View, |
| + private ui::AnimationDelegate { |
| public: |
| enum ResultViewState { |
| NORMAL = 0, |
| @@ -43,7 +47,7 @@ |
| // Updates the match used to paint the contents of this result view. We copy |
| // 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; } |
| + void SetMatch(const AutocompleteMatch& 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_; } |
| @@ -79,6 +83,10 @@ |
| int icon_vertical_padding_; |
| int text_vertical_padding_; |
| + virtual void AnimationProgressed(const ui::Animation* animation); |
|
Peter Kasting
2011/04/07 20:19:21
Nit: Add "// ui::AnimationDelegate:" above this, r
|
| + |
| + virtual void AnimationCanceled(const ui::Animation* animation); |
| + |
| private: |
| struct ClassificationData; |
| typedef std::vector<ClassificationData> Classifications; |
| @@ -130,8 +138,16 @@ |
| gfx::Rect icon_bounds_; |
| gfx::Rect text_bounds_; |
| + class IconLabelView; |
| + scoped_ptr<IconLabelView> search_view_; |
| + |
| AutocompleteMatch match_; |
| + scoped_refptr<AutocompleteMatch::Keyword> keyword_; |
| + scoped_ptr<ui::SlideAnimation> animation_; |
| + |
| + bool search_expanded_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(AutocompleteResultView); |
| }; |