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

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

Issue 87503004: Pass the Translate error type to the bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (rebasing) Created 7 years, 1 month 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_ui_delegate.h
diff --git a/chrome/browser/translate/translate_ui_delegate.h b/chrome/browser/translate/translate_ui_delegate.h
index 5345c825eedd16ad8bec39149495db3509cd92b3..a53ba5cffd442721c382e3f8abe4d23c1d283fd8 100644
--- a/chrome/browser/translate/translate_ui_delegate.h
+++ b/chrome/browser/translate/translate_ui_delegate.h
@@ -12,6 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/translate/translate_errors.h"
class TranslatePrefs;
@@ -36,7 +37,8 @@ class TranslateUIDelegate {
TranslateUIDelegate(content::WebContents* web_contents,
const std::string& original_language,
- const std::string& target_language);
+ const std::string& target_language,
+ TranslateErrors::Type error_type);
virtual ~TranslateUIDelegate();
// Retrieves the displayable names of the supported languages, based on
@@ -50,6 +52,12 @@ class TranslateUIDelegate {
content::WebContents* web_contents() { return web_contents_; }
+ TranslateErrors::Type error_type() { return error_type_; }
sky 2013/12/02 14:31:19 Make method const.
hajimehoshi 2013/12/03 02:20:46 Done.
+
+ void set_error_type(TranslateErrors::Type error_type) {
+ error_type_ = error_type;
+ }
+
// Returns the number of languages supported.
size_t GetNumberOfLanguages() const;
@@ -124,6 +132,9 @@ class TranslateUIDelegate {
// The translation related preferences.
scoped_ptr<TranslatePrefs> prefs_;
+ // The error type.
+ TranslateErrors::Type error_type_;
+
DISALLOW_COPY_AND_ASSIGN(TranslateUIDelegate);
};
« no previous file with comments | « chrome/browser/translate/translate_manager_browsertest.cc ('k') | chrome/browser/translate/translate_ui_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698