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

Side by Side Diff: chrome/browser/translate/translate_manager.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/browser/translate/translate_manager.h" 5 #include "chrome/browser/translate/translate_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/prefs/pref_service.h" 12 #include "base/prefs/pref_service.h"
13 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/chrome_notification_types.h" 17 #include "chrome/browser/chrome_notification_types.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/tab_contents/language_state.h" 19 #include "chrome/browser/tab_contents/language_state.h"
20 #include "chrome/browser/tab_contents/tab_util.h" 20 #include "chrome/browser/tab_contents/tab_util.h"
21 #include "chrome/browser/translate/page_translated_details.h"
22 #include "chrome/browser/translate/translate_accept_languages.h" 21 #include "chrome/browser/translate/translate_accept_languages.h"
23 #include "chrome/browser/translate/translate_browser_metrics.h" 22 #include "chrome/browser/translate/translate_browser_metrics.h"
24 #include "chrome/browser/translate/translate_error_details.h"
25 #include "chrome/browser/translate/translate_event_details.h"
26 #include "chrome/browser/translate/translate_infobar_delegate.h" 23 #include "chrome/browser/translate/translate_infobar_delegate.h"
27 #include "chrome/browser/translate/translate_language_list.h" 24 #include "chrome/browser/translate/translate_language_list.h"
28 #include "chrome/browser/translate/translate_prefs.h" 25 #include "chrome/browser/translate/translate_prefs.h"
29 #include "chrome/browser/translate/translate_script.h" 26 #include "chrome/browser/translate/translate_script.h"
30 #include "chrome/browser/translate/translate_tab_helper.h" 27 #include "chrome/browser/translate/translate_tab_helper.h"
31 #include "chrome/browser/translate/translate_url_util.h" 28 #include "chrome/browser/translate/translate_url_util.h"
32 #include "chrome/browser/ui/browser.h" 29 #include "chrome/browser/ui/browser.h"
33 #include "chrome/browser/ui/browser_finder.h" 30 #include "chrome/browser/ui/browser_finder.h"
34 #include "chrome/browser/ui/browser_tabstrip.h" 31 #include "chrome/browser/ui/browser_tabstrip.h"
35 #include "chrome/browser/ui/browser_window.h" 32 #include "chrome/browser/ui/browser_window.h"
36 #include "chrome/browser/ui/tabs/tab_strip_model.h" 33 #include "chrome/browser/ui/tabs/tab_strip_model.h"
37 #include "chrome/browser/ui/translate/translate_bubble_factory.h" 34 #include "chrome/browser/ui/translate/translate_bubble_factory.h"
38 #include "chrome/common/chrome_switches.h" 35 #include "chrome/common/chrome_switches.h"
39 #include "chrome/common/pref_names.h" 36 #include "chrome/common/pref_names.h"
40 #include "chrome/common/render_messages.h" 37 #include "chrome/common/render_messages.h"
41 #include "chrome/common/translate/language_detection_details.h"
42 #include "chrome/common/url_constants.h" 38 #include "chrome/common/url_constants.h"
43 #include "components/translate/common/translate_constants.h" 39 #include "components/translate/core/browser/page_translated_details.h"
40 #include "components/translate/core/browser/translate_error_details.h"
41 #include "components/translate/core/browser/translate_event_details.h"
42 #include "components/translate/core/common/language_detection_details.h"
43 #include "components/translate/core/common/translate_constants.h"
44 #include "content/public/browser/navigation_controller.h" 44 #include "content/public/browser/navigation_controller.h"
45 #include "content/public/browser/navigation_details.h" 45 #include "content/public/browser/navigation_details.h"
46 #include "content/public/browser/navigation_entry.h" 46 #include "content/public/browser/navigation_entry.h"
47 #include "content/public/browser/notification_details.h" 47 #include "content/public/browser/notification_details.h"
48 #include "content/public/browser/notification_service.h" 48 #include "content/public/browser/notification_service.h"
49 #include "content/public/browser/notification_source.h" 49 #include "content/public/browser/notification_source.h"
50 #include "content/public/browser/notification_types.h" 50 #include "content/public/browser/notification_types.h"
51 #include "content/public/browser/render_process_host.h" 51 #include "content/public/browser/render_process_host.h"
52 #include "content/public/browser/render_view_host.h" 52 #include "content/public/browser/render_view_host.h"
53 #include "content/public/browser/web_contents.h" 53 #include "content/public/browser/web_contents.h"
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 // so we are more aggressive about showing the shortcut to never translate. 799 // so we are more aggressive about showing the shortcut to never translate.
800 #if defined(OS_ANDROID) 800 #if defined(OS_ANDROID)
801 config.never_translate_min_count = 1; 801 config.never_translate_min_count = 1;
802 #else 802 #else
803 config.never_translate_min_count = 3; 803 config.never_translate_min_count = 3;
804 #endif // defined(OS_ANDROID) 804 #endif // defined(OS_ANDROID)
805 805
806 config.always_translate_min_count = 3; 806 config.always_translate_min_count = 3;
807 return config; 807 return config;
808 } 808 }
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_manager.h ('k') | chrome/browser/translate/translate_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698