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

Unified Diff: chrome/browser/ui/views/location_bar/suggested_text_view.cc

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 | « chrome/browser/instant/instant_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/suggested_text_view.cc
diff --git a/chrome/browser/ui/views/location_bar/suggested_text_view.cc b/chrome/browser/ui/views/location_bar/suggested_text_view.cc
index 512a3886f6b5d78752926d0b71dbfb726838b482..4c0d2082358ca9b655e09e566c5286f1767fcaec 100644
--- a/chrome/browser/ui/views/location_bar/suggested_text_view.cc
+++ b/chrome/browser/ui/views/location_bar/suggested_text_view.cc
@@ -10,12 +10,6 @@
#include "gfx/canvas.h"
#include "gfx/color_utils.h"
-// Amount of time to wait before starting the animation.
-static const int kPauseTimeMS = 1000;
-
-// Duration of the animation in which the colors change.
-static const int kFadeInTimeMS = 300;
-
SuggestedTextView::SuggestedTextView(LocationBarView* location_bar)
: location_bar_(location_bar),
bg_color_(0) {
@@ -78,8 +72,10 @@ void SuggestedTextView::AnimationCanceled(const Animation* animation) {
Animation* SuggestedTextView::CreateAnimation() {
MultiAnimation::Parts parts;
- parts.push_back(MultiAnimation::Part(kPauseTimeMS, Tween::ZERO));
- parts.push_back(MultiAnimation::Part(kFadeInTimeMS, Tween::EASE_IN));
+ parts.push_back(MultiAnimation::Part(
+ InstantController::kAutoCommitPauseTimeMS, Tween::ZERO));
+ parts.push_back(MultiAnimation::Part(
+ InstantController::kAutoCommitFadeInTimeMS, Tween::EASE_IN));
MultiAnimation* animation = new MultiAnimation(parts);
animation->set_delegate(this);
animation->set_continuous(false);
« no previous file with comments | « chrome/browser/instant/instant_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698