OLD | NEW |
---|---|
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 "content/browser/android/browser_jni_registrar.h" | 5 #include "content/browser/android/browser_jni_registrar.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_registrar.h" | 8 #include "base/android/jni_registrar.h" |
9 #include "content/browser/android/browser_startup_controller.h" | |
10 #include "content/browser/android/child_process_launcher_android.h" | |
11 #include "content/browser/mojo/service_registrar_android.h" | |
12 #include "content/browser/mojo/service_registry_android.h" | |
13 #include "content/browser/renderer_host/input/motion_event_android.h" | |
14 #include "mojo/android/system/core_impl.h" | |
15 | |
16 #if !defined(USE_AURA) | |
9 #include "content/browser/accessibility/browser_accessibility_android.h" | 17 #include "content/browser/accessibility/browser_accessibility_android.h" |
10 #include "content/browser/accessibility/browser_accessibility_manager_android.h" | 18 #include "content/browser/accessibility/browser_accessibility_manager_android.h" |
11 #include "content/browser/android/background_sync_network_observer_android.h" | 19 #include "content/browser/android/background_sync_network_observer_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" | 20 #include "content/browser/android/composited_touch_handle_drawable.h" |
15 #include "content/browser/android/content_readback_handler.h" | 21 #include "content/browser/android/content_readback_handler.h" |
16 #include "content/browser/android/content_video_view.h" | 22 #include "content/browser/android/content_video_view.h" |
17 #include "content/browser/android/content_view_core_impl.h" | 23 #include "content/browser/android/content_view_core_impl.h" |
18 #include "content/browser/android/content_view_render_view.h" | 24 #include "content/browser/android/content_view_render_view.h" |
19 #include "content/browser/android/content_view_statics.h" | 25 #include "content/browser/android/content_view_statics.h" |
20 #include "content/browser/android/date_time_chooser_android.h" | 26 #include "content/browser/android/date_time_chooser_android.h" |
21 #include "content/browser/android/download_controller_android_impl.h" | 27 #include "content/browser/android/download_controller_android_impl.h" |
22 #include "content/browser/android/interstitial_page_delegate_android.h" | 28 #include "content/browser/android/interstitial_page_delegate_android.h" |
23 #include "content/browser/android/load_url_params.h" | 29 #include "content/browser/android/load_url_params.h" |
24 #include "content/browser/android/popup_touch_handle_drawable.h" | 30 #include "content/browser/android/popup_touch_handle_drawable.h" |
25 #include "content/browser/android/tracing_controller_android.h" | 31 #include "content/browser/android/tracing_controller_android.h" |
26 #include "content/browser/android/web_contents_observer_proxy.h" | 32 #include "content/browser/android/web_contents_observer_proxy.h" |
27 #include "content/browser/device_sensors/sensor_manager_android.h" | 33 #include "content/browser/device_sensors/sensor_manager_android.h" |
28 #include "content/browser/frame_host/navigation_controller_android.h" | 34 #include "content/browser/frame_host/navigation_controller_android.h" |
29 #include "content/browser/gamepad/gamepad_platform_data_fetcher_android.h" | 35 #include "content/browser/gamepad/gamepad_platform_data_fetcher_android.h" |
30 #include "content/browser/geolocation/location_api_adapter_android.h" | 36 #include "content/browser/geolocation/location_api_adapter_android.h" |
31 #include "content/browser/media/android/media_drm_credential_manager.h" | 37 #include "content/browser/media/android/media_drm_credential_manager.h" |
32 #include "content/browser/media/android/media_resource_getter_impl.h" | 38 #include "content/browser/media/android/media_resource_getter_impl.h" |
33 #include "content/browser/media/android/media_session.h" | 39 #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" | 40 #include "content/browser/power_save_blocker_android.h" |
37 #include "content/browser/renderer_host/ime_adapter_android.h" | 41 #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 " | 42 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h " |
40 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h" | 43 #include "content/browser/screen_orientation/screen_orientation_delegate_android .h" |
41 #include "content/browser/speech/speech_recognizer_impl_android.h" | 44 #include "content/browser/speech/speech_recognizer_impl_android.h" |
42 #include "content/browser/time_zone_monitor_android.h" | 45 #include "content/browser/time_zone_monitor_android.h" |
43 #include "content/browser/vr/android/cardboard/cardboard_vr_device.h" | 46 #include "content/browser/vr/android/cardboard/cardboard_vr_device.h" |
44 #include "content/browser/web_contents/web_contents_android.h" | 47 #include "content/browser/web_contents/web_contents_android.h" |
45 #include "mojo/android/system/core_impl.h" | 48 #endif |
46 | 49 |
47 namespace { | 50 namespace { |
48 base::android::RegistrationMethod kContentRegisteredMethods[] = { | 51 base::android::RegistrationMethod kContentRegisteredMethods[] = { |
52 {"BrowserStartupController", content::RegisterBrowserStartupController}, | |
53 {"CoreImpl", mojo::android::RegisterCoreImpl}, | |
54 {"MotionEventAndroid", | |
55 content::MotionEventAndroid::RegisterMotionEventAndroid}, | |
56 {"ChildProcessLauncher", content::RegisterChildProcessLauncher}, | |
57 #if !defined(USE_AURA) | |
49 {"AndroidLocationApiAdapter", | 58 {"AndroidLocationApiAdapter", |
50 content::AndroidLocationApiAdapter::RegisterGeolocationService}, | 59 content::AndroidLocationApiAdapter::RegisterGeolocationService}, |
51 {"BackgroundSyncNetworkObserverAndroid", | 60 {"BackgroundSyncNetworkObserverAndroid", |
52 content::BackgroundSyncNetworkObserverAndroid::Observer:: | 61 content::BackgroundSyncNetworkObserverAndroid::Observer:: |
53 RegisterNetworkObserver}, | 62 RegisterNetworkObserver}, |
54 {"BrowserAccessibilityManager", | 63 {"BrowserAccessibilityManager", |
55 content::RegisterBrowserAccessibilityManager}, | 64 content::RegisterBrowserAccessibilityManager}, |
56 {"BrowserStartupController", content::RegisterBrowserStartupController}, | |
57 #if defined(ENABLE_WEBVR) | 65 #if defined(ENABLE_WEBVR) |
58 {"CardboardVRDevice", | 66 {"CardboardVRDevice", |
59 content::CardboardVRDevice::RegisterCardboardVRDevice}, | 67 content::CardboardVRDevice::RegisterCardboardVRDevice}, |
60 #endif | 68 #endif |
61 {"ChildProcessLauncher", content::RegisterChildProcessLauncher}, | |
62 {"ContentReadbackHandler", | 69 {"ContentReadbackHandler", |
63 content::ContentReadbackHandler::RegisterContentReadbackHandler}, | 70 content::ContentReadbackHandler::RegisterContentReadbackHandler}, |
64 {"ContentVideoView", content::ContentVideoView::RegisterContentVideoView}, | 71 {"ContentVideoView", content::ContentVideoView::RegisterContentVideoView}, |
65 {"ContentViewCore", content::RegisterContentViewCore}, | 72 {"ContentViewCore", content::RegisterContentViewCore}, |
66 {"ContentViewRenderView", | 73 {"ContentViewRenderView", |
67 content::ContentViewRenderView::RegisterContentViewRenderView}, | 74 content::ContentViewRenderView::RegisterContentViewRenderView}, |
68 {"CoreImpl", mojo::android::RegisterCoreImpl}, | |
69 {"DateTimePickerAndroid", content::RegisterDateTimeChooserAndroid}, | 75 {"DateTimePickerAndroid", content::RegisterDateTimeChooserAndroid}, |
70 {"DownloadControllerAndroidImpl", | 76 {"DownloadControllerAndroidImpl", |
71 content::DownloadControllerAndroidImpl::RegisterDownloadController}, | 77 content::DownloadControllerAndroidImpl::RegisterDownloadController}, |
72 {"GamepadList", | 78 {"GamepadList", |
73 content::GamepadPlatformDataFetcherAndroid:: | 79 content::GamepadPlatformDataFetcherAndroid:: |
74 RegisterGamepadPlatformDataFetcherAndroid}, | 80 RegisterGamepadPlatformDataFetcherAndroid}, |
75 {"HandleViewResources", | 81 {"HandleViewResources", |
76 content::CompositedTouchHandleDrawable::RegisterHandleViewResources}, | 82 content::CompositedTouchHandleDrawable::RegisterHandleViewResources}, |
77 {"InterstitialPageDelegateAndroid", | 83 {"InterstitialPageDelegateAndroid", |
78 content::InterstitialPageDelegateAndroid:: | 84 content::InterstitialPageDelegateAndroid:: |
79 RegisterInterstitialPageDelegateAndroid}, | 85 RegisterInterstitialPageDelegateAndroid}, |
80 {"LoadUrlParams", content::RegisterLoadUrlParams}, | 86 {"LoadUrlParams", content::RegisterLoadUrlParams}, |
81 {"MediaDrmCredentialManager", | 87 {"MediaDrmCredentialManager", |
no sievers
2015/11/02 22:27:15
I think you want to keep Media* now, Also ContentV
mfomitchev
2015/11/03 22:23:19
Done.
| |
82 content::MediaDrmCredentialManager::RegisterMediaDrmCredentialManager}, | 88 content::MediaDrmCredentialManager::RegisterMediaDrmCredentialManager}, |
83 {"MediaResourceGetterImpl", | 89 {"MediaResourceGetterImpl", |
84 content::MediaResourceGetterImpl::RegisterMediaResourceGetter}, | 90 content::MediaResourceGetterImpl::RegisterMediaResourceGetter}, |
85 {"MediaSession", content::MediaSession::RegisterMediaSession}, | 91 {"MediaSession", content::MediaSession::RegisterMediaSession}, |
86 {"MotionEventAndroid", | |
87 content::MotionEventAndroid::RegisterMotionEventAndroid}, | |
88 {"MotionEventSynthesizer", | 92 {"MotionEventSynthesizer", |
89 content::SyntheticGestureTargetAndroid::RegisterMotionEventSynthesizer}, | 93 content::SyntheticGestureTargetAndroid::RegisterMotionEventSynthesizer}, |
90 {"NavigationControllerAndroid", | 94 {"NavigationControllerAndroid", |
91 content::NavigationControllerAndroid::Register}, | 95 content::NavigationControllerAndroid::Register}, |
92 {"PopupTouchHandleDrawable", | 96 {"PopupTouchHandleDrawable", |
93 content::PopupTouchHandleDrawable::RegisterPopupTouchHandleDrawable}, | 97 content::PopupTouchHandleDrawable::RegisterPopupTouchHandleDrawable}, |
94 {"PowerSaveBlock", content::RegisterPowerSaveBlocker}, | 98 {"PowerSaveBlock", content::RegisterPowerSaveBlocker}, |
95 {"RegisterImeAdapter", content::RegisterImeAdapter}, | 99 {"RegisterImeAdapter", content::RegisterImeAdapter}, |
96 {"ScreenOrientationProvider", | 100 {"ScreenOrientationProvider", |
97 content::ScreenOrientationDelegateAndroid::Register}, | 101 content::ScreenOrientationDelegateAndroid::Register}, |
98 {"SensorManagerAndroid", content::SensorManagerAndroid::Register}, | 102 {"SensorManagerAndroid", content::SensorManagerAndroid::Register}, |
99 {"ServiceRegistrarAndroid", content::ServiceRegistrarAndroid::Register}, | 103 {"ServiceRegistrarAndroid", content::ServiceRegistrarAndroid::Register}, |
100 {"ServiceRegistryAndroid", content::ServiceRegistryAndroid::Register}, | 104 {"ServiceRegistryAndroid", content::ServiceRegistryAndroid::Register}, |
101 {"SpeechRecognizerImplAndroid", | 105 {"SpeechRecognizerImplAndroid", |
102 content::SpeechRecognizerImplAndroid::RegisterSpeechRecognizer}, | 106 content::SpeechRecognizerImplAndroid::RegisterSpeechRecognizer}, |
103 {"TimeZoneMonitorAndroid", content::TimeZoneMonitorAndroid::Register}, | 107 {"TimeZoneMonitorAndroid", content::TimeZoneMonitorAndroid::Register}, |
104 {"TracingControllerAndroid", content::RegisterTracingControllerAndroid}, | 108 {"TracingControllerAndroid", content::RegisterTracingControllerAndroid}, |
105 {"WebContentsAndroid", content::WebContentsAndroid::Register}, | 109 {"WebContentsAndroid", content::WebContentsAndroid::Register}, |
106 {"WebContentsObserver", content::RegisterWebContentsObserverProxy}, | 110 {"WebContentsObserver", content::RegisterWebContentsObserverProxy}, |
107 {"WebViewStatics", content::RegisterWebViewStatics}, | 111 {"WebViewStatics", content::RegisterWebViewStatics}, |
112 #endif // USE_AURA | |
108 }; | 113 }; |
109 | 114 |
110 } // namespace | 115 } // namespace |
111 | 116 |
112 namespace content { | 117 namespace content { |
113 namespace android { | 118 namespace android { |
114 | 119 |
115 bool RegisterBrowserJni(JNIEnv* env) { | 120 bool RegisterBrowserJni(JNIEnv* env) { |
116 return RegisterNativeMethods(env, kContentRegisteredMethods, | 121 return RegisterNativeMethods(env, kContentRegisteredMethods, |
117 arraysize(kContentRegisteredMethods)); | 122 arraysize(kContentRegisteredMethods)); |
118 } | 123 } |
119 | 124 |
120 } // namespace android | 125 } // namespace android |
121 } // namespace content | 126 } // namespace content |
OLD | NEW |