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

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

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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
Index: chrome/browser/translate/translate_infobar_delegate.h
===================================================================
--- chrome/browser/translate/translate_infobar_delegate.h (revision 238220)
+++ chrome/browser/translate/translate_infobar_delegate.h (working copy)
@@ -9,8 +9,8 @@
#include <utility>
#include <vector>
-#include "base/compiler_specific.h"
#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/infobars/infobar_delegate.h"
#include "chrome/browser/translate/translate_prefs.h"
#include "chrome/common/translate/translate_errors.h"
@@ -180,8 +180,7 @@
bool autodetermined_source_language);
protected:
- TranslateInfoBarDelegate(InfoBarService* infobar_service,
- Type infobar_type,
+ TranslateInfoBarDelegate(Type infobar_type,
TranslateInfoBarDelegate* old_delegate,
const std::string& original_language,
const std::string& target_language,
@@ -190,10 +189,14 @@
ShortcutConfiguration shortcut_config);
private:
+ friend class TranslationInfoBarTest;
typedef std::pair<std::string, string16> LanguageNamePair;
+ // Returns a translate infobar that owns |delegate|.
+ static scoped_ptr<InfoBar> CreateInfoBar(
+ scoped_ptr<TranslateInfoBarDelegate> delegate);
+
// InfoBarDelegate:
- virtual InfoBar* CreateInfoBar(InfoBarService* infobar_service) OVERRIDE;
virtual void InfoBarDismissed() OVERRIDE;
virtual int GetIconID() const OVERRIDE;
virtual InfoBarDelegate::Type GetInfoBarType() const OVERRIDE;
« no previous file with comments | « chrome/browser/translate/translate_browsertest.cc ('k') | chrome/browser/translate/translate_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698