diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 19:01:19 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 19:01:19 +0000 |
commit | f4f50efb4d3ee42470c8057345e902ac42e76801 (patch) | |
tree | 5b4d0c57cd94d8169db9dc441f424d6443e4f490 /chrome/browser/translate/translate_infobar_delegate.h | |
parent | 0bd22cab9c919ff8d9b35153f6799dc031fe2770 (diff) | |
download | chromium_src-f4f50efb4d3ee42470c8057345e902ac42e76801.zip chromium_src-f4f50efb4d3ee42470c8057345e902ac42e76801.tar.gz chromium_src-f4f50efb4d3ee42470c8057345e902ac42e76801.tar.bz2 |
Cleanup: de-inline a bunch of classes, rename and move "PluginInstaller" to "PluginInstallerInfoBarDelegate" for clarity, lots of other misc. stuff
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6249010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/translate/translate_infobar_delegate.h')
-rw-r--r-- | chrome/browser/translate/translate_infobar_delegate.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/translate/translate_infobar_delegate.h b/chrome/browser/translate/translate_infobar_delegate.h index 549af3d..1bc8a98 100644 --- a/chrome/browser/translate/translate_infobar_delegate.h +++ b/chrome/browser/translate/translate_infobar_delegate.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -54,7 +54,7 @@ class TranslateInfoBarDelegate : public InfoBarDelegate { virtual ~TranslateInfoBarDelegate(); // Returns the number of languages supported. - int GetLanguageCount() const; + int GetLanguageCount() const { return static_cast<int>(languages_.size()); } // Returns the ISO code for the language at |index|. std::string GetLanguageCodeAt(int index) const; @@ -82,7 +82,7 @@ class TranslateInfoBarDelegate : public InfoBarDelegate { // Returns true if the current infobar indicates an error (in which case it // should get a yellow background instead of a blue one). - bool IsError(); + bool IsError() const { return type_ == TRANSLATION_ERROR; } // Returns what kind of background fading effect the infobar should use when // its is shown. @@ -98,14 +98,6 @@ class TranslateInfoBarDelegate : public InfoBarDelegate { // infobar or pressing the "Don't translate" button. void TranslationDeclined(); - // InfoBarDelegate implementation: - virtual InfoBar* CreateInfoBar(); - virtual void InfoBarDismissed(); - virtual void InfoBarClosed(); - virtual SkBitmap* GetIcon() const; - virtual InfoBarDelegate::Type GetInfoBarType(); - virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); - // Methods called by the Options menu delegate. virtual bool IsLanguageBlacklisted(); virtual void ToggleLanguageBlacklist(); @@ -164,6 +156,14 @@ class TranslateInfoBarDelegate : public InfoBarDelegate { private: typedef std::pair<std::string, string16> LanguageNamePair; + // InfoBarDelegate implementation: + virtual InfoBar* CreateInfoBar(); + virtual void InfoBarDismissed(); + virtual void InfoBarClosed(); + virtual SkBitmap* GetIcon() const; + virtual InfoBarDelegate::Type GetInfoBarType() const; + virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); + // Gets the host of the page being translated, or an empty string if no URL is // associated with the current page. std::string GetPageHost(); |