OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/ui/webui/translate_internals/translate_internals_handle
r.h" | 5 #include "chrome/browser/ui/webui/translate_internals/translate_internals_handle
r.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/prefs/pref_service.h" | |
13 #include "base/values.h" | 12 #include "base/values.h" |
14 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
15 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/translate/chrome_translate_client.h" | 15 #include "chrome/browser/translate/chrome_translate_client.h" |
17 #include "chrome/browser/translate/translate_service.h" | 16 #include "chrome/browser/translate/translate_service.h" |
18 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 18 #include "components/prefs/pref_service.h" |
19 #include "components/translate/core/browser/translate_download_manager.h" | 19 #include "components/translate/core/browser/translate_download_manager.h" |
20 #include "components/translate/core/browser/translate_error_details.h" | 20 #include "components/translate/core/browser/translate_error_details.h" |
21 #include "components/translate/core/browser/translate_event_details.h" | 21 #include "components/translate/core/browser/translate_event_details.h" |
22 #include "components/translate/core/browser/translate_prefs.h" | 22 #include "components/translate/core/browser/translate_prefs.h" |
23 #include "components/translate/core/common/language_detection_details.h" | 23 #include "components/translate/core/common/language_detection_details.h" |
24 #include "components/translate/core/common/translate_pref_names.h" | 24 #include "components/translate/core/common/translate_pref_names.h" |
25 #include "content/public/browser/notification_details.h" | 25 #include "content/public/browser/notification_details.h" |
26 #include "content/public/browser/notification_service.h" | 26 #include "content/public/browser/notification_service.h" |
27 #include "content/public/browser/notification_source.h" | 27 #include "content/public/browser/notification_source.h" |
28 #include "content/public/browser/notification_types.h" | 28 #include "content/public/browser/notification_types.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 if (translate::TranslateDownloadManager::IsAlphaLanguage(lang)) | 225 if (translate::TranslateDownloadManager::IsAlphaLanguage(lang)) |
226 alpha_languages_list->Append(new base::StringValue(lang)); | 226 alpha_languages_list->Append(new base::StringValue(lang)); |
227 } | 227 } |
228 | 228 |
229 dict.Set("languages", languages_list); | 229 dict.Set("languages", languages_list); |
230 dict.Set("alpha_languages", alpha_languages_list); | 230 dict.Set("alpha_languages", alpha_languages_list); |
231 dict.Set("last_updated", | 231 dict.Set("last_updated", |
232 new base::FundamentalValue(last_updated.ToJsTime())); | 232 new base::FundamentalValue(last_updated.ToJsTime())); |
233 SendMessageToJs("supportedLanguagesUpdated", dict); | 233 SendMessageToJs("supportedLanguagesUpdated", dict); |
234 } | 234 } |
OLD | NEW |