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

Unified Diff: chrome/browser/translate/translate_infobar_delegate.h

Issue 6249010: Cleanup: de-inline a bunch of classes, rename and move "PluginInstaller" to "... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/translate/translate_infobar_delegate.h
===================================================================
--- chrome/browser/translate/translate_infobar_delegate.h (revision 72158)
+++ chrome/browser/translate/translate_infobar_delegate.h (working copy)
@@ -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 @@
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 @@
// 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 @@
// 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 @@
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();
Property changes on: chrome/browser/translate/translate_infobar_delegate.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/translate/languages_menu_model.cc ('k') | chrome/browser/translate/translate_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698