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

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: Address comments from Ken 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 #include "chrome/browser/speech/tts_controller.h" 75 #include "chrome/browser/speech/tts_controller.h"
76 #include "chrome/browser/speech/tts_message_filter.h" 76 #include "chrome/browser/speech/tts_message_filter.h"
77 #include "chrome/browser/ssl/ssl_add_certificate.h" 77 #include "chrome/browser/ssl/ssl_add_certificate.h"
78 #include "chrome/browser/ssl/ssl_blocking_page.h" 78 #include "chrome/browser/ssl/ssl_blocking_page.h"
79 #include "chrome/browser/ssl/ssl_cert_reporter.h" 79 #include "chrome/browser/ssl/ssl_cert_reporter.h"
80 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" 80 #include "chrome/browser/ssl/ssl_client_certificate_selector.h"
81 #include "chrome/browser/ssl/ssl_error_handler.h" 81 #include "chrome/browser/ssl/ssl_error_handler.h"
82 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" 82 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h"
83 #include "chrome/browser/tab_contents/tab_util.h" 83 #include "chrome/browser/tab_contents/tab_util.h"
84 #include "chrome/browser/tracing/chrome_tracing_delegate.h" 84 #include "chrome/browser/tracing/chrome_tracing_delegate.h"
85 #include "chrome/browser/translate/chrome_translate_client.h"
85 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" 86 #include "chrome/browser/ui/blocked_content/blocked_window_params.h"
86 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" 87 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
87 #include "chrome/browser/ui/browser_navigator.h" 88 #include "chrome/browser/ui/browser_navigator.h"
88 #include "chrome/browser/ui/browser_navigator_params.h" 89 #include "chrome/browser/ui/browser_navigator_params.h"
89 #include "chrome/browser/ui/chrome_select_file_policy.h" 90 #include "chrome/browser/ui/chrome_select_file_policy.h"
90 #include "chrome/browser/ui/sync/sync_promo_ui.h" 91 #include "chrome/browser/ui/sync/sync_promo_ui.h"
91 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" 92 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
92 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 93 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
93 #include "chrome/browser/ui/webui/log_web_ui_url.h" 94 #include "chrome/browser/ui/webui/log_web_ui_url.h"
94 #include "chrome/browser/usb/usb_tab_helper.h" 95 #include "chrome/browser/usb/usb_tab_helper.h"
(...skipping 2722 matching lines...) Expand 10 before | Expand all | Expand 10 after
2817 if (!render_frame_host->GetParent()) { 2818 if (!render_frame_host->GetParent()) {
2818 registry->AddInterface( 2819 registry->AddInterface(
2819 base::Bind(&ChromePasswordManagerClient::BindCredentialManager, 2820 base::Bind(&ChromePasswordManagerClient::BindCredentialManager,
2820 render_frame_host)); 2821 render_frame_host));
2821 } 2822 }
2822 2823
2823 registry->AddInterface( 2824 registry->AddInterface(
2824 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, 2825 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver,
2825 render_frame_host)); 2826 render_frame_host));
2826 2827
2828 // Register mojo ContentTranslateDriver interface only for main frame.
Tom Sepez 2016/08/01 17:08:17 nit: does the order matter? Can/Should we combine
leonhsl(Using Gerrit) 2016/08/02 02:52:23 Yeah good point! Sorry for my carelessness. Done a
2829 if (!render_frame_host->GetParent()) {
2830 registry->AddInterface(base::Bind(
2831 &ChromeTranslateClient::BindContentTranslateDriver, render_frame_host));
2832 }
2833
2827 #if BUILDFLAG(ANDROID_JAVA_UI) 2834 #if BUILDFLAG(ANDROID_JAVA_UI)
2828 ChromeServiceRegistrarAndroid::RegisterRenderFrameMojoInterfaces( 2835 ChromeServiceRegistrarAndroid::RegisterRenderFrameMojoInterfaces(
2829 registry, render_frame_host); 2836 registry, render_frame_host);
2830 #endif 2837 #endif
2831 } 2838 }
2832 2839
2833 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( 2840 void ChromeContentBrowserClient::RegisterInProcessMojoApplications(
2834 StaticMojoApplicationMap* apps) { 2841 StaticMojoApplicationMap* apps) {
2835 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) 2842 #if (ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
2836 content::MojoApplicationInfo app_info; 2843 content::MojoApplicationInfo app_info;
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
3049 if (channel <= kMaxDisableEncryptionChannel) { 3056 if (channel <= kMaxDisableEncryptionChannel) {
3050 static const char* const kWebRtcDevSwitchNames[] = { 3057 static const char* const kWebRtcDevSwitchNames[] = {
3051 switches::kDisableWebRtcEncryption, 3058 switches::kDisableWebRtcEncryption,
3052 }; 3059 };
3053 to_command_line->CopySwitchesFrom(from_command_line, 3060 to_command_line->CopySwitchesFrom(from_command_line,
3054 kWebRtcDevSwitchNames, 3061 kWebRtcDevSwitchNames,
3055 arraysize(kWebRtcDevSwitchNames)); 3062 arraysize(kWebRtcDevSwitchNames));
3056 } 3063 }
3057 } 3064 }
3058 #endif // defined(ENABLE_WEBRTC) 3065 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698