diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 18:30:05 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 18:30:05 +0000 |
commit | 59efee1132427f4610125f2933992b5952783b26 (patch) | |
tree | 0dc78d7c15a9dff63597422d5d230c935f394185 /chrome/browser/gtk/translate | |
parent | 6b77976f7ebe04fd91ccbaf5bfd77c5a9065c518 (diff) | |
download | chromium_src-59efee1132427f4610125f2933992b5952783b26.zip chromium_src-59efee1132427f4610125f2933992b5952783b26.tar.gz chromium_src-59efee1132427f4610125f2933992b5952783b26.tar.bz2 |
Makes the browser fetch the translate script regularly.
New versions of that script may get pushed from time to time.
Fetching the script again ensures people that don't restart their browser for long periods of time still get the new versions.
Also renamed the enum from constant style to macro-style, as it is the Chromium way to go from the Chromium style guide (which is in that regard different than the Google style guide).
BUG=None
TEST=Run the unit-tests.
Review URL: http://codereview.chromium.org/3034013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/translate')
-rw-r--r-- | chrome/browser/gtk/translate/translate_infobar_base_gtk.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/gtk/translate/translate_infobar_base_gtk.cc b/chrome/browser/gtk/translate/translate_infobar_base_gtk.cc index c0998d6..bb55831 100644 --- a/chrome/browser/gtk/translate/translate_infobar_base_gtk.cc +++ b/chrome/browser/gtk/translate/translate_infobar_base_gtk.cc @@ -36,14 +36,14 @@ TranslateInfoBarBase::TranslateInfoBarBase(TranslateInfoBarDelegate* delegate) : InfoBar(delegate) { TranslateInfoBarDelegate::BackgroundAnimationType animation = delegate->background_animation_type(); - if (animation != TranslateInfoBarDelegate::kNone) { + if (animation != TranslateInfoBarDelegate::NONE) { background_color_animation_.reset(new SlideAnimation(this)); background_color_animation_->SetTweenType(Tween::LINEAR); background_color_animation_->SetSlideDuration(500); - if (animation == TranslateInfoBarDelegate::kNormalToError) { + if (animation == TranslateInfoBarDelegate::NORMAL_TO_ERROR) { background_color_animation_->Show(); } else { - DCHECK_EQ(TranslateInfoBarDelegate::kErrorToNormal, animation); + DCHECK_EQ(TranslateInfoBarDelegate::ERROR_TO_NORMAL, animation); // Hide() runs the animation in reverse. background_color_animation_->Reset(1.0); background_color_animation_->Hide(); @@ -218,14 +218,14 @@ void TranslateInfoBarBase::OnOptionsClicked(GtkWidget* sender) { InfoBar* TranslateInfoBarDelegate::CreateInfoBar() { TranslateInfoBarBase* infobar = NULL; switch (type_) { - case kBeforeTranslate: + case BEFORE_TRANSLATE: infobar = new BeforeTranslateInfoBar(this); break; - case kAfterTranslate: + case AFTER_TRANSLATE: infobar = new AfterTranslateInfoBar(this); break; - case kTranslating: - case kTranslationError: + case TRANSLATING: + case TRANSLATION_ERROR: infobar = new TranslateMessageInfoBar(this); break; default: |