OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/renderer/i18n_custom_bindings.h" | 5 #include "extensions/renderer/i18n_custom_bindings.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 9 |
7 #include <vector> | 10 #include <vector> |
8 | 11 |
9 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/macros.h" |
10 #include "content/public/renderer/render_frame.h" | 14 #include "content/public/renderer/render_frame.h" |
11 #include "content/public/renderer/render_thread.h" | 15 #include "content/public/renderer/render_thread.h" |
12 #include "extensions/common/extension_messages.h" | 16 #include "extensions/common/extension_messages.h" |
13 #include "extensions/common/message_bundle.h" | 17 #include "extensions/common/message_bundle.h" |
14 #include "extensions/renderer/script_context.h" | 18 #include "extensions/renderer/script_context.h" |
15 #include "extensions/renderer/v8_helpers.h" | 19 #include "extensions/renderer/v8_helpers.h" |
16 #include "third_party/cld_2/src/public/compact_lang_det.h" | 20 #include "third_party/cld_2/src/public/compact_lang_det.h" |
17 #include "third_party/cld_2/src/public/encodings.h" | 21 #include "third_party/cld_2/src/public/encodings.h" |
18 | 22 |
19 namespace extensions { | 23 namespace extensions { |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 } | 247 } |
244 | 248 |
245 LanguageDetectionResult result(is_reliable); | 249 LanguageDetectionResult result(is_reliable); |
246 // populate LanguageDetectionResult with languages and percents | 250 // populate LanguageDetectionResult with languages and percents |
247 InitDetectedLanguages(languages, percents, &result.languages); | 251 InitDetectedLanguages(languages, percents, &result.languages); |
248 | 252 |
249 args.GetReturnValue().Set(result.ToValue(context())); | 253 args.GetReturnValue().Set(result.ToValue(context())); |
250 } | 254 } |
251 | 255 |
252 } // namespace extensions | 256 } // namespace extensions |
OLD | NEW |