Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: chrome/browser/ui/views/autocomplete/autocomplete_result_view.h

Issue 6731036: Enabled pressing TAB to cycle through the Omnibox results. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/autocomplete/autocomplete_result_view.h
===================================================================
--- chrome/browser/ui/views/autocomplete/autocomplete_result_view.h (revision 80868)
+++ 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_;
+ // ui::AnimationDelegate:
+ virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
+ virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE;
Peter Kasting 2011/04/11 23:17:33 You want to override AnimationEnded(), not Animati
+
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);
};

Powered by Google App Engine
This is Rietveld 408576698