Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: chrome/renderer/translate/translate_helper.cc

Issue 93603006: Move Translate-related files to components/translate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/renderer/translate/translate_helper.h" 5 #include "chrome/renderer/translate/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/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "chrome/common/render_messages.h" 14 #include "chrome/common/render_messages.h"
15 #include "chrome/renderer/extensions/extension_groups.h" 15 #include "chrome/renderer/extensions/extension_groups.h"
16 #include "chrome/renderer/isolated_world_ids.h" 16 #include "chrome/renderer/isolated_world_ids.h"
17 #include "components/translate/common/translate_constants.h" 17 #include "components/translate/core/common/translate_constants.h"
18 #include "components/translate/common/translate_metrics.h" 18 #include "components/translate/core/common/translate_metrics.h"
19 #include "components/translate/common/translate_util.h" 19 #include "components/translate/core/common/translate_util.h"
20 #include "components/translate/language_detection/language_detection_util.h" 20 #include "components/translate/language_detection/language_detection_util.h"
21 #include "content/public/renderer/render_view.h" 21 #include "content/public/renderer/render_view.h"
22 #include "third_party/WebKit/public/web/WebDocument.h" 22 #include "third_party/WebKit/public/web/WebDocument.h"
23 #include "third_party/WebKit/public/web/WebElement.h" 23 #include "third_party/WebKit/public/web/WebElement.h"
24 #include "third_party/WebKit/public/web/WebFrame.h" 24 #include "third_party/WebKit/public/web/WebFrame.h"
25 #include "third_party/WebKit/public/web/WebNode.h" 25 #include "third_party/WebKit/public/web/WebNode.h"
26 #include "third_party/WebKit/public/web/WebNodeList.h" 26 #include "third_party/WebKit/public/web/WebNodeList.h"
27 #include "third_party/WebKit/public/web/WebScriptSource.h" 27 #include "third_party/WebKit/public/web/WebScriptSource.h"
28 #include "third_party/WebKit/public/web/WebView.h" 28 #include "third_party/WebKit/public/web/WebView.h"
29 #include "third_party/WebKit/public/web/WebWidget.h" 29 #include "third_party/WebKit/public/web/WebWidget.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 492
493 WebFrame* TranslateHelper::GetMainFrame() { 493 WebFrame* TranslateHelper::GetMainFrame() {
494 WebView* web_view = render_view()->GetWebView(); 494 WebView* web_view = render_view()->GetWebView();
495 495
496 // When the tab is going to be closed, the web_view can be NULL. 496 // When the tab is going to be closed, the web_view can be NULL.
497 if (!web_view) 497 if (!web_view)
498 return NULL; 498 return NULL;
499 499
500 return web_view->mainFrame(); 500 return web_view->mainFrame();
501 } 501 }
OLDNEW
« no previous file with comments | « chrome/renderer/translate/translate_helper.h ('k') | chrome/renderer/translate/translate_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698