| 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 "components/translate/content/renderer/translate_helper.h" | 5 #include "components/translate/content/renderer/translate_helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/metrics/histogram_macros.h" | 11 #include "base/metrics/histogram_macros.h" |
| 12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
| 17 #include "components/translate/core/common/translate_constants.h" | 17 #include "components/translate/core/common/translate_constants.h" |
| 18 #include "components/translate/core/common/translate_metrics.h" | 18 #include "components/translate/core/common/translate_metrics.h" |
| 19 #include "components/translate/core/common/translate_util.h" | 19 #include "components/translate/core/common/translate_util.h" |
| 20 #include "components/translate/core/language_detection/language_detection_util.h
" | 20 #include "components/translate/core/language_detection/language_detection_util.h
" |
| 21 #include "content/public/common/content_constants.h" | 21 #include "content/public/common/content_constants.h" |
| 22 #include "content/public/common/url_constants.h" | 22 #include "content/public/common/url_constants.h" |
| 23 #include "content/public/renderer/render_frame.h" | 23 #include "content/public/renderer/render_frame.h" |
| 24 #include "content/public/renderer/render_thread.h" | 24 #include "content/public/renderer/render_thread.h" |
| 25 #include "services/shell/public/cpp/interface_provider.h" | 25 #include "services/service_manager/public/cpp/interface_provider.h" |
| 26 #include "third_party/WebKit/public/web/WebDocument.h" | 26 #include "third_party/WebKit/public/web/WebDocument.h" |
| 27 #include "third_party/WebKit/public/web/WebElement.h" | 27 #include "third_party/WebKit/public/web/WebElement.h" |
| 28 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 28 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 29 #include "third_party/WebKit/public/web/WebNode.h" | 29 #include "third_party/WebKit/public/web/WebNode.h" |
| 30 #include "third_party/WebKit/public/web/WebScriptSource.h" | 30 #include "third_party/WebKit/public/web/WebScriptSource.h" |
| 31 #include "url/gurl.h" | 31 #include "url/gurl.h" |
| 32 #include "v8/include/v8.h" | 32 #include "v8/include/v8.h" |
| 33 | 33 |
| 34 using base::ASCIIToUTF16; | 34 using base::ASCIIToUTF16; |
| 35 using blink::WebDocument; | 35 using blink::WebDocument; |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 binding_.Close(); | 474 binding_.Close(); |
| 475 translate_callback_pending_.Reset(); | 475 translate_callback_pending_.Reset(); |
| 476 CancelPendingTranslation(); | 476 CancelPendingTranslation(); |
| 477 } | 477 } |
| 478 | 478 |
| 479 void TranslateHelper::OnDestruct() { | 479 void TranslateHelper::OnDestruct() { |
| 480 delete this; | 480 delete this; |
| 481 } | 481 } |
| 482 | 482 |
| 483 } // namespace translate | 483 } // namespace translate |
| OLD | NEW |