Home
last modified time | relevance | path

Searched refs:TranslateManager (Results 1 – 23 of 23) sorted by relevance

/external/chromium_org/chrome/browser/translate/
Dtranslate_manager.cc87 TranslateManager::~TranslateManager() { in ~TranslateManager()
91 TranslateManager* TranslateManager::GetInstance() { in GetInstance()
92 return Singleton<TranslateManager>::get(); in GetInstance()
96 bool TranslateManager::IsTranslatableURL(const GURL& url) { in IsTranslatableURL()
115 void TranslateManager::GetSupportedLanguages( in GetSupportedLanguages()
125 base::Time TranslateManager::GetSupportedLanguagesLastUpdated() { in GetSupportedLanguagesLastUpdated()
134 std::string TranslateManager::GetLanguageCode( in GetLanguageCode()
143 bool TranslateManager::IsSupportedLanguage(const std::string& language) { in IsSupportedLanguage()
151 bool TranslateManager::IsAlphaLanguage(const std::string& language) { in IsAlphaLanguage()
159 bool TranslateManager::IsAcceptLanguage(Profile* profile, in IsAcceptLanguage()
[all …]
Dtranslate_manager_unittest.cc20 EXPECT_FALSE(TranslateManager::IsTranslatableURL(empty_url)); in TEST_F()
24 EXPECT_FALSE(TranslateManager::IsTranslatableURL(chrome_url)); in TEST_F()
28 EXPECT_FALSE(TranslateManager::IsTranslatableURL(devtools_url)); in TEST_F()
36 EXPECT_FALSE(TranslateManager::IsTranslatableURL(filemanager_url)); in TEST_F()
41 EXPECT_FALSE(TranslateManager::IsTranslatableURL(ftp_url)); in TEST_F()
44 EXPECT_TRUE(TranslateManager::IsTranslatableURL(right_url)); in TEST_F()
Dtranslate_manager.h49 class TranslateManager : public content::NotificationObserver {
52 static TranslateManager* GetInstance();
54 virtual ~TranslateManager();
159 TranslateManager();
162 friend struct DefaultSingletonTraits<TranslateManager>;
236 base::WeakPtrFactory<TranslateManager> weak_method_factory_;
238 DISALLOW_COPY_AND_ASSIGN(TranslateManager);
Dtranslate_manager_browsertest.cc179 TranslateManager::GetInstance()->SetTranslateScriptExpirationDelay(0); in ExpireTranslateScriptImmediately()
236 TranslateManager::GetInstance()->ClearTranslateScript(); in SetUp()
237 TranslateManager::GetInstance()-> in SetUp()
239 TranslateManager::GetInstance()->set_translate_max_reload_attemps(0); in SetUp()
357 std::string target_language = TranslateManager::GetLanguageCode( in ShowImplementation()
615 bool expected = TranslateManager::IsSupportedLanguage(lang) && in TEST_F()
644 TranslateManager::GetSupportedLanguages(&default_supported_languages); in TEST_F()
650 TranslateManager::GetSupportedLanguages(&current_supported_languages); in TEST_F()
657 TranslateManager::GetSupportedLanguages(&current_supported_languages); in TEST_F()
664 TranslateManager::GetSupportedLanguages(&current_supported_languages); in TEST_F()
[all …]
Dtranslate_infobar_delegate.cc46 DCHECK(TranslateManager::IsSupportedLanguage(target_language)); in Create()
47 if (!TranslateManager::IsSupportedLanguage(original_language)) { in Create()
113 TranslateManager::GetInstance()->ReportLanguageDetectionError( in ReportLanguageDetectionError()
228 TranslateManager::GetInstance()->TranslatePage( in MessageInfoBarButtonPressed()
Dtranslate_ui_delegate.cc46 TranslateManager::GetSupportedLanguages(&language_codes); in TranslateUIDelegate()
159 TranslateManager::GetInstance()->TranslatePage(web_contents(), in Translate()
167 TranslateManager::GetInstance()->RevertTranslation(web_contents()); in RevertTranslation()
Dtranslate_url_util.cc33 TranslateManager::GetLanguageCode( in AddHostLocaleToUrl()
Dtranslate_language_list.cc114 TranslateManager* manager = TranslateManager::GetInstance(); in NotifyEvent()
Dtranslate_prefs.cc293 TranslateManager::IsAcceptLanguage(profile, language); in CanTranslateLanguage()
449 std::string ui_lang = TranslateManager::GetLanguageCode(app_locale); in CreateBlockedLanguages()
/external/chromium/chrome/browser/translate/
Dtranslate_manager.cc148 TranslateManager::supported_languages_(base::LINKER_INITIALIZED);
150 TranslateManager::~TranslateManager() { in ~TranslateManager()
154 TranslateManager* TranslateManager::GetInstance() { in GetInstance()
155 return Singleton<TranslateManager>::get(); in GetInstance()
159 bool TranslateManager::IsTranslatableURL(const GURL& url) { in IsTranslatableURL()
171 void TranslateManager::GetSupportedLanguages( in GetSupportedLanguages()
179 std::string TranslateManager::GetLanguageCode( in GetLanguageCode()
189 bool TranslateManager::IsSupportedLanguage(const std::string& page_language) { in IsSupportedLanguage()
198 void TranslateManager::Observe(NotificationType type, in Observe()
239 &TranslateManager::InitiateTranslationPosted, in Observe()
[all …]
Dtranslate_manager.h34 class TranslateManager : public NotificationObserver,
38 static TranslateManager* GetInstance();
40 virtual ~TranslateManager();
98 TranslateManager();
101 friend struct DefaultSingletonTraits<TranslateManager>;
166 ScopedRunnableMethodFactory<TranslateManager> method_factory_;
186 DISALLOW_COPY_AND_ASSIGN(TranslateManager);
Dtranslate_infobar_delegate.cc39 !TranslateManager::IsSupportedLanguage(original_language)) || in CreateDelegate()
40 !TranslateManager::IsSupportedLanguage(target_language)) in CreateDelegate()
107 TranslateManager::GetInstance()->TranslatePage(tab_contents_, in Translate()
113 TranslateManager::GetInstance()->RevertTranslation(tab_contents_); in RevertTranslation()
118 TranslateManager::GetInstance()->ReportLanguageDetectionError(tab_contents_); in ReportLanguageDetectionError()
250 TranslateManager::GetInstance()->TranslatePage(tab_contents_, in MessageInfoBarButtonPressed()
325 TranslateManager::GetSupportedLanguages(&language_codes); in TranslateInfoBarDelegate()
Dtranslate_manager_browsertest.cc122 TranslateManager::GetInstance()->set_translate_script_expiration_delay(0); in ExpireTranslateScriptImmediately()
155 TranslateManager::GetInstance()->ClearTranslateScript(); in SetUp()
156 TranslateManager::GetInstance()-> in SetUp()
/external/chromium_org/chrome/browser/ui/webui/translate_internals/
Dtranslate_internals_handler.cc24 TranslateManager::GetInstance()->AddObserver(this); in TranslateInternalsHandler()
28 TranslateManager::GetInstance()->RemoveObserver(this); in ~TranslateInternalsHandler()
40 if (!TranslateManager::IsTranslatableURL(details.url)) in OnLanguageDetection()
169 TranslateManager::GetSupportedLanguages(&languages); in SendSupportedLanguagesToJs()
171 TranslateManager::GetSupportedLanguagesLastUpdated(); in SendSupportedLanguagesToJs()
179 if (TranslateManager::IsAlphaLanguage(lang)) in SendSupportedLanguagesToJs()
Dtranslate_internals_handler.h26 public TranslateManager::Observer {
/external/chromium_org/chrome/browser/
Dchrome_browser_main.h32 class TranslateManager; variable
173 TranslateManager* translate_manager_;
Dchrome_browser_main.cc1303 translate_manager_ = TranslateManager::GetInstance(); in PreMainMessageLoopRunImpl()
/external/chromium_org/chrome/browser/ui/webui/options/
Dlanguage_options_handler_common.cc128 TranslateManager::GetTargetLanguage(prefs); in GetLocalizedValues()
133 TranslateManager::GetSupportedLanguages(&languages); in GetLocalizedValues()
/external/chromium/chrome/browser/tab_contents/
Drender_view_context_menu.cc651 locale = TranslateManager::GetLanguageCode(locale); in AppendPageItems()
914 target_lang = TranslateManager::GetLanguageCode(target_lang); in IsCommandIdEnabled()
926 TranslateManager::IsSupportedLanguage(original_lang)) && in IsCommandIdEnabled()
929 TranslateManager::IsTranslatableURL(params_.page_url); in IsCommandIdEnabled()
1367 target_lang = TranslateManager::GetLanguageCode(target_lang); in ExecuteCommand()
1373 TranslateManager::GetInstance()->TranslatePage( in ExecuteCommand()
/external/chromium_org/chrome/browser/tab_contents/
Drender_view_context_menu.cc959 if (TranslateManager::IsTranslatableURL(params_.page_url)) { in AppendPageItems()
961 locale = TranslateManager::GetLanguageCode(locale); in AppendPageItems()
1247 target_lang = TranslateManager::GetLanguageCode(target_lang); in IsCommandIdEnabled()
1258 TranslateManager::IsSupportedLanguage(target_lang) && in IsCommandIdEnabled()
1831 target_lang = TranslateManager::GetLanguageCode(target_lang); in ExecuteCommand()
1837 TranslateManager::GetInstance()->TranslatePage( in ExecuteCommand()
/external/chromium_org/chrome/browser/ui/views/translate/
Dtranslate_bubble_view.cc75 TranslateManager::GetAutoTargetLanguage(*source, prefs); in GetTranslateLanguages()
81 *target = TranslateManager::GetTargetLanguage(prefs); in GetTranslateLanguages()
/external/chromium/chrome/browser/
Dbrowser_main.cc1547 TranslateManager::GetInstance(); in BrowserMain()
/external/chromium_org/chrome/browser/ui/views/location_bar/
Dlocation_bar_view.cc1539 if (!TranslateManager::IsTranslateBubbleEnabled()) in RefreshTranslateIcon()