Chromium Code Reviews| Index: chrome/browser/extensions/api/i18n/i18n_api.h |
| diff --git a/chrome/browser/extensions/api/i18n/i18n_api.h b/chrome/browser/extensions/api/i18n/i18n_api.h |
| index 5863aaacf22c42625d43467e99cc5928bb968db7..9ba9a4dc246b5198c429f6ecce42e9a04e24d25b 100644 |
| --- a/chrome/browser/extensions/api/i18n/i18n_api.h |
| +++ b/chrome/browser/extensions/api/i18n/i18n_api.h |
| @@ -5,19 +5,41 @@ |
| #ifndef CHROME_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_ |
| #define CHROME_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_ |
| +#include <string> |
| +#include <vector> |
| + |
| #include "chrome/browser/extensions/chrome_extension_function.h" |
| +#include "chrome/common/extensions/api/i18n.h" |
| #include "extensions/browser/browser_context_keyed_api_factory.h" |
| +#include "extensions/browser/extension_function.h" |
| +#include "third_party/cld_2/src/public/compact_lang_det.h" |
| +#include "third_party/cld_2/src/public/encodings.h" |
| class Profile; |
| namespace extensions { |
| - |
|
not at google - send to devlin
2015/07/14 18:42:58
Leave this blank line in i.e. don't delete it.
amalika
2015/07/14 22:41:02
Done.
|
| class I18nGetAcceptLanguagesFunction : public ChromeSyncExtensionFunction { |
| ~I18nGetAcceptLanguagesFunction() override {} |
| bool RunSync() override; |
| DECLARE_EXTENSION_FUNCTION("i18n.getAcceptLanguages", I18N_GETACCEPTLANGUAGES) |
| }; |
| +class I18nDetectLanguageFunction : public UIThreadExtensionFunction { |
| + private: |
| + ~I18nDetectLanguageFunction() override{}; |
| + ResponseAction Run() override; |
|
not at google - send to devlin
2015/07/14 18:42:58
For overrides of an interface you usually do
// U
amalika
2015/07/14 22:41:02
Done.
|
| + void GetLanguage(const std::string& text); |
| + void SendLanguagesResult( |
| + const extensions::api::i18n::DetectLanguage::Results::Result& result); |
| + void InitDetectedLanguages( |
| + CLD2::Language* langs, |
| + int* percent3, |
| + std::vector<linked_ptr<extensions::api::i18n::DetectLanguage::Results:: |
|
not at google - send to devlin
2015/07/14 18:42:58
"extensions::" prefix not necessary anywhere, this
amalika
2015/07/14 22:41:02
Done.
|
| + Result::LanguagesType>>* detected_langs); |
| + |
| + DECLARE_EXTENSION_FUNCTION("i18n.detectLanguage", I18N_DETECTLANGUAGE) |
| +}; |
| + |
| } // namespace extensions |
| #endif // CHROME_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_ |