OLD | NEW |
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 #include "chrome/browser/extensions/extension_tabs_module.h" | 5 #include "chrome/browser/extensions/extension_tabs_module.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/memory/ref_counted_memory.h" | 12 #include "base/memory/ref_counted_memory.h" |
| 13 #include "base/message_loop.h" |
13 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
14 #include "base/string16.h" | 15 #include "base/string16.h" |
15 #include "base/string_number_conversions.h" | 16 #include "base/string_number_conversions.h" |
16 #include "base/string_util.h" | 17 #include "base/string_util.h" |
17 #include "base/stringprintf.h" | 18 #include "base/stringprintf.h" |
18 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
19 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 20 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
20 #include "chrome/browser/extensions/extension_host.h" | 21 #include "chrome/browser/extensions/extension_host.h" |
21 #include "chrome/browser/extensions/extension_service.h" | 22 #include "chrome/browser/extensions/extension_service.h" |
22 #include "chrome/browser/extensions/extension_tab_util.h" | 23 #include "chrome/browser/extensions/extension_tab_util.h" |
(...skipping 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 // called for every API call the extension made. | 1647 // called for every API call the extension made. |
1647 GotLanguage(language); | 1648 GotLanguage(language); |
1648 } | 1649 } |
1649 | 1650 |
1650 void DetectTabLanguageFunction::GotLanguage(const std::string& language) { | 1651 void DetectTabLanguageFunction::GotLanguage(const std::string& language) { |
1651 result_.reset(Value::CreateStringValue(language.c_str())); | 1652 result_.reset(Value::CreateStringValue(language.c_str())); |
1652 SendResponse(true); | 1653 SendResponse(true); |
1653 | 1654 |
1654 Release(); // Balanced in Run() | 1655 Release(); // Balanced in Run() |
1655 } | 1656 } |
OLD | NEW |