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
3 // found in the LICENSE file.
5 #include "content/browser/android/browser_jni_registrar.h"
7 #include "base/android/jni_android.h"
8 #include "base/android/jni_registrar.h"
9 #include "content/browser/accessibility/browser_accessibility_android.h"
10 #include "content/browser/accessibility/browser_accessibility_manager_android.h"
11 #include "content/browser/android/background_sync_launcher_android.h"
12 #include "content/browser/android/browser_startup_controller.h"
13 #include "content/browser/android/child_process_launcher_android.h"
14 #include "content/browser/android/composited_touch_handle_drawable.h"
15 #include "content/browser/android/content_readback_handler.h"
16 #include "content/browser/android/content_video_view.h"
17 #include "content/browser/android/content_view_core_impl.h"
18 #include "content/browser/android/content_view_render_view.h"
19 #include "content/browser/android/content_view_statics.h"
20 #include "content/browser/android/date_time_chooser_android.h"
21 #include "content/browser/android/download_controller_android_impl.h"
22 #include "content/browser/android/interstitial_page_delegate_android.h"
23 #include "content/browser/android/load_url_params.h"
24 #include "content/browser/android/popup_touch_handle_drawable.h"
25 #include "content/browser/android/tracing_controller_android.h"
26 #include "content/browser/android/web_contents_observer_proxy.h"
27 #include "content/browser/device_sensors/sensor_manager_android.h"
28 #include "content/browser/frame_host/navigation_controller_android.h"
29 #include "content/browser/gamepad/gamepad_platform_data_fetcher_android.h"
30 #include "content/browser/geolocation/location_api_adapter_android.h"
31 #include "content/browser/media/android/media_drm_credential_manager.h"
32 #include "content/browser/media/android/media_resource_getter_impl.h"
33 #include "content/browser/media/android/media_session.h"
34 #include "content/browser/mojo/service_registrar_android.h"
35 #include "content/browser/mojo/service_registry_android.h"
36 #include "content/browser/power_save_blocker_android.h"
37 #include "content/browser/renderer_host/ime_adapter_android.h"
38 #include "content/browser/renderer_host/input/motion_event_android.h"
39 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h"
40 #include "content/browser/screen_orientation/screen_orientation_delegate_android.h"
41 #include "content/browser/speech/speech_recognizer_impl_android.h"
42 #include "content/browser/time_zone_monitor_android.h"
43 #include "content/browser/web_contents/web_contents_android.h"
44 #include "mojo/android/system/core_impl.h"
47 base::android::RegistrationMethod kContentRegisteredMethods
[] = {
48 {"AndroidLocationApiAdapter",
49 content::AndroidLocationApiAdapter::RegisterGeolocationService
},
50 {"BackgroundSyncLauncherAndroid",
51 content::BackgroundSyncLauncherAndroid::RegisterLauncher
},
52 {"BrowserAccessibilityManager",
53 content::RegisterBrowserAccessibilityManager
},
54 {"BrowserStartupController", content::RegisterBrowserStartupController
},
55 {"ChildProcessLauncher", content::RegisterChildProcessLauncher
},
56 {"ContentReadbackHandler",
57 content::ContentReadbackHandler::RegisterContentReadbackHandler
},
58 {"ContentVideoView", content::ContentVideoView::RegisterContentVideoView
},
59 {"ContentViewCore", content::RegisterContentViewCore
},
60 {"ContentViewRenderView",
61 content::ContentViewRenderView::RegisterContentViewRenderView
},
62 {"CoreImpl", mojo::android::RegisterCoreImpl
},
63 {"DateTimePickerAndroid", content::RegisterDateTimeChooserAndroid
},
64 {"DownloadControllerAndroidImpl",
65 content::DownloadControllerAndroidImpl::RegisterDownloadController
},
67 content::GamepadPlatformDataFetcherAndroid::
68 RegisterGamepadPlatformDataFetcherAndroid
},
69 {"HandleViewResources",
70 content::CompositedTouchHandleDrawable::RegisterHandleViewResources
},
71 {"InterstitialPageDelegateAndroid",
72 content::InterstitialPageDelegateAndroid::
73 RegisterInterstitialPageDelegateAndroid
},
74 {"LoadUrlParams", content::RegisterLoadUrlParams
},
75 {"MediaDrmCredentialManager",
76 content::MediaDrmCredentialManager::RegisterMediaDrmCredentialManager
},
77 {"MediaResourceGetterImpl",
78 content::MediaResourceGetterImpl::RegisterMediaResourceGetter
},
79 {"MediaSession", content::MediaSession::RegisterMediaSession
},
80 {"MotionEventAndroid",
81 content::MotionEventAndroid::RegisterMotionEventAndroid
},
82 {"MotionEventSynthesizer",
83 content::SyntheticGestureTargetAndroid::RegisterMotionEventSynthesizer
},
84 {"NavigationControllerAndroid",
85 content::NavigationControllerAndroid::Register
},
86 {"PopupTouchHandleDrawable",
87 content::PopupTouchHandleDrawable::RegisterPopupTouchHandleDrawable
},
88 {"PowerSaveBlock", content::RegisterPowerSaveBlocker
},
89 {"RegisterImeAdapter", content::RegisterImeAdapter
},
90 {"ScreenOrientationProvider",
91 content::ScreenOrientationDelegateAndroid::Register
},
92 {"SensorManagerAndroid", content::SensorManagerAndroid::Register
},
93 {"ServiceRegistrarAndroid", content::ServiceRegistrarAndroid::Register
},
94 {"ServiceRegistryAndroid", content::ServiceRegistryAndroid::Register
},
95 {"SpeechRecognizerImplAndroid",
96 content::SpeechRecognizerImplAndroid::RegisterSpeechRecognizer
},
97 {"TimeZoneMonitorAndroid", content::TimeZoneMonitorAndroid::Register
},
98 {"TracingControllerAndroid", content::RegisterTracingControllerAndroid
},
99 {"WebContentsAndroid", content::WebContentsAndroid::Register
},
100 {"WebContentsObserver", content::RegisterWebContentsObserverProxy
},
101 {"WebViewStatics", content::RegisterWebViewStatics
},
109 bool RegisterBrowserJni(JNIEnv
* env
) {
110 return RegisterNativeMethods(env
, kContentRegisteredMethods
,
111 arraysize(kContentRegisteredMethods
));
114 } // namespace android
115 } // namespace content