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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_gtk.h

Issue 5588004: [gtk] Add fade-commit to instant suggestion for predictive instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 10 years 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
« no previous file with comments | « app/multi_animation.cc ('k') | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
index feee937cf1702665d30b798b0b60cd4e881cf24d..fa25e9066c78d8eb815b9c3c77b367e3444776c8 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
@@ -11,6 +11,7 @@
#include <algorithm>
#include <string>
+#include "app/animation_delegate.h"
#include "app/gtk_signal.h"
#include "app/gtk_signal_registrar.h"
#include "base/basictypes.h"
@@ -28,6 +29,7 @@
class AutocompleteEditController;
class AutocompleteEditModel;
class AutocompletePopupView;
+class MultiAnimation;
class Profile;
class TabContents;
@@ -44,7 +46,8 @@ class GtkThemeProvider;
#endif
class AutocompleteEditViewGtk : public AutocompleteEditView,
- public NotificationObserver {
+ public NotificationObserver,
+ public AnimationDelegate {
public:
// Modeled like the Windows CHARRANGE. Represent a pair of cursor position
// offsets. Since GtkTextIters are invalid after the buffer is changed, we
@@ -146,7 +149,16 @@ class AutocompleteEditViewGtk : public AutocompleteEditView,
const NotificationSource& source,
const NotificationDetails& details);
+ // Overridden from AnimationDelegate.
+ virtual void AnimationEnded(const Animation* animation);
+ virtual void AnimationProgressed(const Animation* animation);
+ virtual void AnimationCanceled(const Animation* animation);
+
+ // Sets the colors of the text view according to the theme.
void SetBaseColor();
+ // Sets the colors of the instant suggestion view according to the theme and
+ // the animation state.
+ void UpdateInstantViewColors();
void SetInstantSuggestion(const std::string& suggestion);
bool CommitInstantSuggestion();
@@ -349,6 +361,9 @@ class AutocompleteEditViewGtk : public AutocompleteEditView,
// A widget for displaying instant suggestion text. It'll be attached to a
// child anchor in the |text_buffer_| object.
GtkWidget* instant_view_;
+ // Animation from instant suggest (faded text) to autocomplete (selected
+ // text).
+ scoped_ptr<MultiAnimation> instant_animation_;
// A mark to split the content and the instant anchor. Wherever the end
// iterator of the text buffer is required, the iterator to this mark should
« no previous file with comments | « app/multi_animation.cc ('k') | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698