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

Side by Side Diff: chrome/browser/translate/translate_manager.h

Issue 15470004: Translate: display alpha language name with (alpha) suffix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (rebase) Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_
6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // translate to and from. 108 // translate to and from.
109 static void GetSupportedLanguages(std::vector<std::string>* languages); 109 static void GetSupportedLanguages(std::vector<std::string>* languages);
110 110
111 // Returns the language code that can be used with the Translate method for a 111 // Returns the language code that can be used with the Translate method for a
112 // specified |chrome_locale|. 112 // specified |chrome_locale|.
113 static std::string GetLanguageCode(const std::string& chrome_locale); 113 static std::string GetLanguageCode(const std::string& chrome_locale);
114 114
115 // Returns true if |language| is supported by the translation server. 115 // Returns true if |language| is supported by the translation server.
116 static bool IsSupportedLanguage(const std::string& language); 116 static bool IsSupportedLanguage(const std::string& language);
117 117
118 // Returns true if |language| is supported by the translation server as a
119 // alpha language.
120 static bool IsAlphaLanguage(const std::string& language);
121
118 // The observer class for TranslateManager. 122 // The observer class for TranslateManager.
119 class Observer { 123 class Observer {
120 public: 124 public:
121 virtual void OnLanguageDetection( 125 virtual void OnLanguageDetection(
122 const LanguageDetectionDetails& details) = 0; 126 const LanguageDetectionDetails& details) = 0;
123 virtual void OnTranslateError( 127 virtual void OnTranslateError(
124 const TranslateErrorDetails& details) = 0; 128 const TranslateErrorDetails& details) = 0;
125 }; 129 };
126 130
127 // Adds/removes observer. 131 // Adds/removes observer.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // List of registered observers. 235 // List of registered observers.
232 ObserverList<Observer> observer_list_; 236 ObserverList<Observer> observer_list_;
233 237
234 // An instance of TranslateLanguageList which manages supported language list. 238 // An instance of TranslateLanguageList which manages supported language list.
235 scoped_ptr<TranslateLanguageList> language_list_; 239 scoped_ptr<TranslateLanguageList> language_list_;
236 240
237 DISALLOW_COPY_AND_ASSIGN(TranslateManager); 241 DISALLOW_COPY_AND_ASSIGN(TranslateManager);
238 }; 242 };
239 243
240 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ 244 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_language_list.cc ('k') | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698