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

Unified Diff: components/translate/core/browser/translate_client.h

Issue 284313008: Move TranslateInfoBarDelegate and OptionsMenuModel to the Translate component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + review comments Created 6 years, 7 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: components/translate/core/browser/translate_client.h
diff --git a/components/translate/core/browser/translate_client.h b/components/translate/core/browser/translate_client.h
index 6a2c3775ea5523aed040ca3c32f6f6c5344269e2..38fcdea97e69b23a062a62ba2aa0b37e92fb3e87 100644
--- a/components/translate/core/browser/translate_client.h
+++ b/components/translate/core/browser/translate_client.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "components/translate/core/browser/translate_prefs.h"
#include "components/translate/core/browser/translate_step.h"
#include "components/translate/core/common/translate_errors.h"
@@ -16,6 +17,11 @@ class GURL;
class PrefService;
class TranslateAcceptLanguages;
class TranslateDriver;
+class TranslateInfoBarDelegate;
+
+namespace infobars {
+class InfoBar;
+}
// A client interface that needs to be supplied to TranslateManager by the
// embedder.
@@ -36,6 +42,13 @@ class TranslateClient {
// Returns the associated TranslateAcceptLanguages.
virtual TranslateAcceptLanguages* GetTranslateAcceptLanguages() = 0;
+ // Returns the resource ID of the icon to be shown for the Translate infobars.
+ virtual int GetInfobarIconID() const = 0;
+
+ // Returns a translate infobar that owns |delegate|.
+ virtual scoped_ptr<infobars::InfoBar> CreateInfoBar(
+ scoped_ptr<TranslateInfoBarDelegate> delegate) const = 0;
+
// Called when the embedder should present UI to the user corresponding to the
// user's current |step|.
virtual void ShowTranslateUI(translate::TranslateStep step,

Powered by Google App Engine
This is Rietveld 408576698