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

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

Issue 2214383002: Move registration of Java mojo interfaces to the new InterfaceRegistrar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java-content-interface-registry
Patch Set: Created 4 years, 2 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 #include "content/public/common/web_preferences.h" 166 #include "content/public/common/web_preferences.h"
167 #include "device/usb/public/interfaces/chooser_service.mojom.h" 167 #include "device/usb/public/interfaces/chooser_service.mojom.h"
168 #include "device/usb/public/interfaces/device_manager.mojom.h" 168 #include "device/usb/public/interfaces/device_manager.mojom.h"
169 #include "gin/v8_initializer.h" 169 #include "gin/v8_initializer.h"
170 #include "net/base/mime_util.h" 170 #include "net/base/mime_util.h"
171 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 171 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
172 #include "net/cookies/canonical_cookie.h" 172 #include "net/cookies/canonical_cookie.h"
173 #include "net/cookies/cookie_options.h" 173 #include "net/cookies/cookie_options.h"
174 #include "net/ssl/ssl_cert_request_info.h" 174 #include "net/ssl/ssl_cert_request_info.h"
175 #include "ppapi/host/ppapi_host.h" 175 #include "ppapi/host/ppapi_host.h"
176 #include "services/shell/public/cpp/interface_provider.h"
176 #include "services/shell/public/cpp/service.h" 177 #include "services/shell/public/cpp/service.h"
177 #include "storage/browser/fileapi/external_mount_points.h" 178 #include "storage/browser/fileapi/external_mount_points.h"
179 #include "third_party/WebKit/public/platform/modules/payments/payment_request.mo jom.h"
180 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h"
178 #include "ui/base/l10n/l10n_util.h" 181 #include "ui/base/l10n/l10n_util.h"
179 #include "ui/base/resource/resource_bundle.h" 182 #include "ui/base/resource/resource_bundle.h"
180 #include "ui/resources/grit/ui_resources.h" 183 #include "ui/resources/grit/ui_resources.h"
181 #include "url/gurl.h" 184 #include "url/gurl.h"
182 #include "url/origin.h" 185 #include "url/origin.h"
183 186
184 #if defined(OS_WIN) 187 #if defined(OS_WIN)
185 #include "base/strings/string_tokenizer.h" 188 #include "base/strings/string_tokenizer.h"
186 #include "base/win/windows_version.h" 189 #include "base/win/windows_version.h"
187 #include "chrome/browser/chrome_browser_main_win.h" 190 #include "chrome/browser/chrome_browser_main_win.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 #include "chrome/browser/chrome_browser_main_posix.h" 223 #include "chrome/browser/chrome_browser_main_posix.h"
221 #endif 224 #endif
222 225
223 #if defined(OS_POSIX) && !defined(OS_MACOSX) 226 #if defined(OS_POSIX) && !defined(OS_MACOSX)
224 #include "base/debug/leak_annotations.h" 227 #include "base/debug/leak_annotations.h"
225 #include "components/crash/content/app/breakpad_linux.h" 228 #include "components/crash/content/app/breakpad_linux.h"
226 #include "components/crash/content/browser/crash_handler_host_linux.h" 229 #include "components/crash/content/browser/crash_handler_host_linux.h"
227 #endif 230 #endif
228 231
229 #if BUILDFLAG(ANDROID_JAVA_UI) 232 #if BUILDFLAG(ANDROID_JAVA_UI)
230 #include "chrome/browser/android/mojo/chrome_interface_registrar_android.h"
231 #include "chrome/browser/android/ntp/new_tab_page_url_handler.h" 233 #include "chrome/browser/android/ntp/new_tab_page_url_handler.h"
232 #include "chrome/browser/android/service_tab_launcher.h" 234 #include "chrome/browser/android/service_tab_launcher.h"
233 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" 235 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h"
236 #include "content/public/browser/android/java_interfaces.h"
234 #endif 237 #endif
235 238
236 #if defined(OS_ANDROID) 239 #if defined(OS_ANDROID)
237 #include "chrome/browser/android/devtools_manager_delegate_android.h" 240 #include "chrome/browser/android/devtools_manager_delegate_android.h"
238 #include "ui/base/ui_base_paths.h" 241 #include "ui/base/ui_base_paths.h"
239 #include "ui/gfx/android/device_display_info.h" 242 #include "ui/gfx/android/device_display_info.h"
240 #else 243 #else
241 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" 244 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
242 #endif 245 #endif
243 246
(...skipping 2680 matching lines...) Expand 10 before | Expand all | Expand 10 after
2924 registry->AddInterface( 2927 registry->AddInterface(
2925 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver, 2928 base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver,
2926 render_frame_host)); 2929 render_frame_host));
2927 2930
2928 registry->AddInterface( 2931 registry->AddInterface(
2929 base::Bind(&password_manager::ContentPasswordManagerDriverFactory:: 2932 base::Bind(&password_manager::ContentPasswordManagerDriverFactory::
2930 BindPasswordManagerDriver, 2933 BindPasswordManagerDriver,
2931 render_frame_host)); 2934 render_frame_host));
2932 2935
2933 #if BUILDFLAG(ANDROID_JAVA_UI) 2936 #if BUILDFLAG(ANDROID_JAVA_UI)
2934 ChromeInterfaceRegistrarAndroid::ExposeInterfacesToFrame( 2937 content::WebContents* web_contents =
2935 registry, render_frame_host); 2938 content::WebContents::FromRenderFrameHost(render_frame_host);
2939 if (web_contents) {
2940 registry->AddInterface(
2941 web_contents->GetJavaInterfaces()
2942 ->CreateInterfaceFactory<blink::mojom::PaymentRequest>());
2943 registry->AddInterface(
2944 web_contents->GetJavaInterfaces()
2945 ->CreateInterfaceFactory<blink::mojom::ShareService>());
2946 }
2936 #endif 2947 #endif
2937 } 2948 }
2938 2949
2939 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess( 2950 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess(
2940 shell::InterfaceRegistry* registry, 2951 shell::InterfaceRegistry* registry,
2941 content::GpuProcessHost* render_process_host) { 2952 content::GpuProcessHost* render_process_host) {
2942 } 2953 }
2943 2954
2944 void ChromeContentBrowserClient::RegisterInProcessMojoApplications( 2955 void ChromeContentBrowserClient::RegisterInProcessMojoApplications(
2945 StaticMojoApplicationMap* apps) { 2956 StaticMojoApplicationMap* apps) {
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
3168 if (channel <= kMaxDisableEncryptionChannel) { 3179 if (channel <= kMaxDisableEncryptionChannel) {
3169 static const char* const kWebRtcDevSwitchNames[] = { 3180 static const char* const kWebRtcDevSwitchNames[] = {
3170 switches::kDisableWebRtcEncryption, 3181 switches::kDisableWebRtcEncryption,
3171 }; 3182 };
3172 to_command_line->CopySwitchesFrom(from_command_line, 3183 to_command_line->CopySwitchesFrom(from_command_line,
3173 kWebRtcDevSwitchNames, 3184 kWebRtcDevSwitchNames,
3174 arraysize(kWebRtcDevSwitchNames)); 3185 arraysize(kWebRtcDevSwitchNames));
3175 } 3186 }
3176 } 3187 }
3177 #endif // defined(ENABLE_WEBRTC) 3188 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698