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 "base/macros.h" | 9 #include "base/macros.h" |
10 #include "content/browser/accessibility/browser_accessibility_android.h" | 10 #include "content/browser/accessibility/browser_accessibility_android.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "content/browser/android/service_registry_android_impl.h" | 25 #include "content/browser/android/service_registry_android_impl.h" |
26 #include "content/browser/android/tracing_controller_android.h" | 26 #include "content/browser/android/tracing_controller_android.h" |
27 #include "content/browser/android/web_contents_observer_proxy.h" | 27 #include "content/browser/android/web_contents_observer_proxy.h" |
28 #include "content/browser/device_sensors/sensor_manager_android.h" | 28 #include "content/browser/device_sensors/sensor_manager_android.h" |
29 #include "content/browser/frame_host/navigation_controller_android.h" | 29 #include "content/browser/frame_host/navigation_controller_android.h" |
30 #include "content/browser/gamepad/gamepad_platform_data_fetcher_android.h" | 30 #include "content/browser/gamepad/gamepad_platform_data_fetcher_android.h" |
31 #include "content/browser/geolocation/location_api_adapter_android.h" | 31 #include "content/browser/geolocation/location_api_adapter_android.h" |
32 #include "content/browser/media/android/media_resource_getter_impl.h" | 32 #include "content/browser/media/android/media_resource_getter_impl.h" |
33 #include "content/browser/media/session/media_session_delegate_android.h" | 33 #include "content/browser/media/session/media_session_delegate_android.h" |
34 #include "content/browser/mojo/service_registrar_android.h" | 34 #include "content/browser/mojo/service_registrar_android.h" |
| 35 #include "content/browser/power_save_blocker_android.h" |
35 #include "content/browser/renderer_host/ime_adapter_android.h" | 36 #include "content/browser/renderer_host/ime_adapter_android.h" |
36 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h
" | 37 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h
" |
37 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" | 38 #include "content/browser/screen_orientation/screen_orientation_delegate_android
.h" |
38 #include "content/browser/speech/speech_recognizer_impl_android.h" | 39 #include "content/browser/speech/speech_recognizer_impl_android.h" |
39 #include "content/browser/time_zone_monitor_android.h" | 40 #include "content/browser/time_zone_monitor_android.h" |
40 #include "content/browser/web_contents/web_contents_android.h" | 41 #include "content/browser/web_contents/web_contents_android.h" |
41 #include "device/power_save_blocker/power_save_blocker_android.h" | |
42 #include "mojo/android/system/core_impl.h" | 42 #include "mojo/android/system/core_impl.h" |
43 | 43 |
44 namespace { | 44 namespace { |
45 base::android::RegistrationMethod kContentRegisteredMethods[] = { | 45 base::android::RegistrationMethod kContentRegisteredMethods[] = { |
46 {"BrowserStartupController", content::RegisterBrowserStartupController}, | 46 {"BrowserStartupController", content::RegisterBrowserStartupController}, |
47 {"ChildProcessLauncher", content::RegisterChildProcessLauncher}, | 47 {"ChildProcessLauncher", content::RegisterChildProcessLauncher}, |
48 {"ContentVideoView", content::ContentVideoView::RegisterContentVideoView}, | 48 {"ContentVideoView", content::ContentVideoView::RegisterContentVideoView}, |
49 {"CoreImpl", mojo::android::RegisterCoreImpl}, | 49 {"CoreImpl", mojo::android::RegisterCoreImpl}, |
50 {"MediaResourceGetterImpl", | 50 {"MediaResourceGetterImpl", |
51 content::MediaResourceGetterImpl::RegisterMediaResourceGetter}, | 51 content::MediaResourceGetterImpl::RegisterMediaResourceGetter}, |
52 {"MediaSessionDelegate", content::MediaSessionDelegateAndroid::Register}, | 52 {"MediaSessionDelegate", content::MediaSessionDelegateAndroid::Register}, |
53 {"AndroidLocationApiAdapter", | 53 {"AndroidLocationApiAdapter", |
54 content::AndroidLocationApiAdapter::RegisterGeolocationService}, | 54 content::AndroidLocationApiAdapter::RegisterGeolocationService}, |
55 {"BackgroundSyncNetworkObserverAndroid", | 55 {"BackgroundSyncNetworkObserverAndroid", |
56 content::BackgroundSyncNetworkObserverAndroid::Observer:: | 56 content::BackgroundSyncNetworkObserverAndroid::Observer:: |
57 RegisterNetworkObserver}, | 57 RegisterNetworkObserver}, |
58 {"BrowserAccessibilityManager", | 58 {"BrowserAccessibilityManager", |
59 content::RegisterBrowserAccessibilityManager}, | 59 content::RegisterBrowserAccessibilityManager}, |
60 {"ContentViewCore", content::RegisterContentViewCore}, | 60 {"ContentViewCore", content::RegisterContentViewCore}, |
61 {"ContentViewRenderView", | 61 {"ContentViewRenderView", |
62 content::ContentViewRenderView::RegisterContentViewRenderView}, | 62 content::ContentViewRenderView::RegisterContentViewRenderView}, |
63 {"DateTimePickerAndroid", content::RegisterDateTimeChooserAndroid}, | 63 {"DateTimePickerAndroid", content::RegisterDateTimeChooserAndroid}, |
64 {"DownloadControllerAndroidImpl", | 64 {"DownloadControllerAndroidImpl", |
65 content::DownloadControllerAndroidImpl::RegisterDownloadController}, | 65 content::DownloadControllerAndroidImpl::RegisterDownloadController}, |
66 {"GamepadList", content::GamepadPlatformDataFetcherAndroid:: | 66 {"GamepadList", |
67 RegisterGamepadPlatformDataFetcherAndroid}, | 67 content::GamepadPlatformDataFetcherAndroid:: |
| 68 RegisterGamepadPlatformDataFetcherAndroid}, |
68 {"HandleViewResources", | 69 {"HandleViewResources", |
69 content::CompositedTouchHandleDrawable::RegisterHandleViewResources}, | 70 content::CompositedTouchHandleDrawable::RegisterHandleViewResources}, |
70 {"InterstitialPageDelegateAndroid", | 71 {"InterstitialPageDelegateAndroid", |
71 content::InterstitialPageDelegateAndroid:: | 72 content::InterstitialPageDelegateAndroid:: |
72 RegisterInterstitialPageDelegateAndroid}, | 73 RegisterInterstitialPageDelegateAndroid}, |
73 {"LoadUrlParams", content::RegisterLoadUrlParams}, | 74 {"LoadUrlParams", content::RegisterLoadUrlParams}, |
74 {"MotionEventSynthesizer", | 75 {"MotionEventSynthesizer", |
75 content::SyntheticGestureTargetAndroid::RegisterMotionEventSynthesizer}, | 76 content::SyntheticGestureTargetAndroid::RegisterMotionEventSynthesizer}, |
76 {"NavigationControllerAndroid", | 77 {"NavigationControllerAndroid", |
77 content::NavigationControllerAndroid::Register}, | 78 content::NavigationControllerAndroid::Register}, |
78 {"PopupTouchHandleDrawable", | 79 {"PopupTouchHandleDrawable", |
79 content::PopupTouchHandleDrawable::RegisterPopupTouchHandleDrawable}, | 80 content::PopupTouchHandleDrawable::RegisterPopupTouchHandleDrawable}, |
| 81 {"PowerSaveBlock", content::RegisterPowerSaveBlocker}, |
80 {"RegisterImeAdapter", content::RegisterImeAdapter}, | 82 {"RegisterImeAdapter", content::RegisterImeAdapter}, |
81 {"ScreenOrientationProvider", | 83 {"ScreenOrientationProvider", |
82 content::ScreenOrientationDelegateAndroid::Register}, | 84 content::ScreenOrientationDelegateAndroid::Register}, |
83 {"SensorManagerAndroid", content::SensorManagerAndroid::Register}, | 85 {"SensorManagerAndroid", content::SensorManagerAndroid::Register}, |
84 {"ServiceRegistrarAndroid", content::ServiceRegistrarAndroid::Register}, | 86 {"ServiceRegistrarAndroid", content::ServiceRegistrarAndroid::Register}, |
85 {"ServiceRegistryAndroid", content::ServiceRegistryAndroidImpl::Register}, | 87 {"ServiceRegistryAndroid", content::ServiceRegistryAndroidImpl::Register}, |
86 {"SpeechRecognizerImplAndroid", | 88 {"SpeechRecognizerImplAndroid", |
87 content::SpeechRecognizerImplAndroid::RegisterSpeechRecognizer}, | 89 content::SpeechRecognizerImplAndroid::RegisterSpeechRecognizer}, |
88 {"TimeZoneMonitorAndroid", content::TimeZoneMonitorAndroid::Register}, | 90 {"TimeZoneMonitorAndroid", content::TimeZoneMonitorAndroid::Register}, |
89 {"TracingControllerAndroid", content::RegisterTracingControllerAndroid}, | 91 {"TracingControllerAndroid", content::RegisterTracingControllerAndroid}, |
90 {"WebContentsAndroid", content::WebContentsAndroid::Register}, | 92 {"WebContentsAndroid", content::WebContentsAndroid::Register}, |
91 {"WebContentsObserver", content::RegisterWebContentsObserverProxy}, | 93 {"WebContentsObserver", content::RegisterWebContentsObserverProxy}, |
92 {"WebViewStatics", content::RegisterWebViewStatics}, | 94 {"WebViewStatics", content::RegisterWebViewStatics}, |
93 }; | 95 }; |
94 | 96 |
95 } // namespace | 97 } // namespace |
96 | 98 |
97 namespace content { | 99 namespace content { |
98 namespace android { | 100 namespace android { |
99 | 101 |
100 bool RegisterBrowserJni(JNIEnv* env) { | 102 bool RegisterBrowserJni(JNIEnv* env) { |
101 return RegisterNativeMethods(env, kContentRegisteredMethods, | 103 return RegisterNativeMethods(env, kContentRegisteredMethods, |
102 arraysize(kContentRegisteredMethods)); | 104 arraysize(kContentRegisteredMethods)); |
103 } | 105 } |
104 | 106 |
105 } // namespace android | 107 } // namespace android |
106 } // namespace content | 108 } // namespace content |
OLD | NEW |