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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2143383002: [Translate] Migrate IPCs to Mojo interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 4 years, 4 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 #include "chrome/browser/speech/tts_controller.h" 78 #include "chrome/browser/speech/tts_controller.h"
79 #include "chrome/browser/speech/tts_message_filter.h" 79 #include "chrome/browser/speech/tts_message_filter.h"
80 #include "chrome/browser/ssl/ssl_add_certificate.h" 80 #include "chrome/browser/ssl/ssl_add_certificate.h"
81 #include "chrome/browser/ssl/ssl_blocking_page.h" 81 #include "chrome/browser/ssl/ssl_blocking_page.h"
82 #include "chrome/browser/ssl/ssl_cert_reporter.h" 82 #include "chrome/browser/ssl/ssl_cert_reporter.h"
83 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" 83 #include "chrome/browser/ssl/ssl_client_certificate_selector.h"
84 #include "chrome/browser/ssl/ssl_error_handler.h" 84 #include "chrome/browser/ssl/ssl_error_handler.h"
85 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" 85 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h"
86 #include "chrome/browser/tab_contents/tab_util.h" 86 #include "chrome/browser/tab_contents/tab_util.h"
87 #include "chrome/browser/tracing/chrome_tracing_delegate.h" 87 #include "chrome/browser/tracing/chrome_tracing_delegate.h"
88 #include "chrome/browser/translate/chrome_translate_client.h"
88 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" 89 #include "chrome/browser/ui/blocked_content/blocked_window_params.h"
89 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" 90 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
90 #include "chrome/browser/ui/browser_navigator.h" 91 #include "chrome/browser/ui/browser_navigator.h"
91 #include "chrome/browser/ui/browser_navigator_params.h" 92 #include "chrome/browser/ui/browser_navigator_params.h"
92 #include "chrome/browser/ui/chrome_select_file_policy.h" 93 #include "chrome/browser/ui/chrome_select_file_policy.h"
93 #include "chrome/browser/ui/sync/sync_promo_ui.h" 94 #include "chrome/browser/ui/sync/sync_promo_ui.h"
94 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" 95 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
95 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 96 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
96 #include "chrome/browser/ui/webui/log_web_ui_url.h" 97 #include "chrome/browser/ui/webui/log_web_ui_url.h"
97 #include "chrome/browser/usb/usb_tab_helper.h" 98 #include "chrome/browser/usb/usb_tab_helper.h"
(...skipping 2754 matching lines...) Expand 10 before | Expand all | Expand 10 after
2852 if (!render_frame_host->GetParent()) { 2853 if (!render_frame_host->GetParent()) {
2853 registry->AddInterface( 2854 registry->AddInterface(
2854 base::Bind(&ChromePasswordManagerClient::BindCredentialManager, 2855 base::Bind(&ChromePasswordManagerClient::BindCredentialManager,
2855 render_frame_host)); 2856 render_frame_host));
2856 } 2857 }
2857 2858
2858 registry->AddInterface( 2859 registry->AddInterface(
2859 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, 2860 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver,
2860 render_frame_host)); 2861 render_frame_host));
2861 2862
2863 // Register mojo ContentTranslateDriver service only for main frame.
Ken Rockot(use gerrit already) 2016/07/28 20:16:06 nit: "service" -> "interface"
leonhsl(Using Gerrit) 2016/07/29 12:54:32 Done.
2864 if (!render_frame_host->GetParent()) {
2865 registry->AddInterface(base::Bind(
2866 &ChromeTranslateClient::BindContentTranslateDriver, render_frame_host));
2867 }
2868
2862 #if BUILDFLAG(ANDROID_JAVA_UI) 2869 #if BUILDFLAG(ANDROID_JAVA_UI)
2863 ChromeServiceRegistrarAndroid::RegisterRenderFrameMojoInterfaces( 2870 ChromeServiceRegistrarAndroid::RegisterRenderFrameMojoInterfaces(
2864 registry, render_frame_host); 2871 registry, render_frame_host);
2865 #endif 2872 #endif
2866 } 2873 }
2867 2874
2868 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( 2875 void ChromeContentBrowserClient::RegisterInProcessMojoApplications(
2869 StaticMojoApplicationMap* apps) { 2876 StaticMojoApplicationMap* apps) {
2870 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) 2877 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
2871 content::MojoApplicationInfo app_info; 2878 content::MojoApplicationInfo app_info;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
3083 if (channel <= kMaxDisableEncryptionChannel) { 3090 if (channel <= kMaxDisableEncryptionChannel) {
3084 static const char* const kWebRtcDevSwitchNames[] = { 3091 static const char* const kWebRtcDevSwitchNames[] = {
3085 switches::kDisableWebRtcEncryption, 3092 switches::kDisableWebRtcEncryption,
3086 }; 3093 };
3087 to_command_line->CopySwitchesFrom(from_command_line, 3094 to_command_line->CopySwitchesFrom(from_command_line,
3088 kWebRtcDevSwitchNames, 3095 kWebRtcDevSwitchNames,
3089 arraysize(kWebRtcDevSwitchNames)); 3096 arraysize(kWebRtcDevSwitchNames));
3090 } 3097 }
3091 } 3098 }
3092 #endif // defined(ENABLE_WEBRTC) 3099 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698