OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/content_view_core_impl.h" | 5 #include "content/browser/android/content_view_core_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "content/browser/frame_host/interstitial_page_impl.h" | 29 #include "content/browser/frame_host/interstitial_page_impl.h" |
30 #include "content/browser/media/media_web_contents_observer.h" | 30 #include "content/browser/media/media_web_contents_observer.h" |
31 #include "content/browser/renderer_host/compositor_impl_android.h" | 31 #include "content/browser/renderer_host/compositor_impl_android.h" |
32 #include "content/browser/renderer_host/input/web_input_event_builders_android.h
" | 32 #include "content/browser/renderer_host/input/web_input_event_builders_android.h
" |
33 #include "content/browser/renderer_host/input/web_input_event_util.h" | 33 #include "content/browser/renderer_host/input/web_input_event_util.h" |
34 #include "content/browser/renderer_host/render_view_host_impl.h" | 34 #include "content/browser/renderer_host/render_view_host_impl.h" |
35 #include "content/browser/renderer_host/render_widget_host_impl.h" | 35 #include "content/browser/renderer_host/render_widget_host_impl.h" |
36 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 36 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
37 #include "content/browser/web_contents/web_contents_view_android.h" | 37 #include "content/browser/web_contents/web_contents_view_android.h" |
38 #include "content/common/frame_messages.h" | 38 #include "content/common/frame_messages.h" |
39 #include "content/common/input/web_input_event_traits.h" | |
40 #include "content/common/input_messages.h" | 39 #include "content/common/input_messages.h" |
41 #include "content/common/view_messages.h" | 40 #include "content/common/view_messages.h" |
42 #include "content/public/browser/android/compositor.h" | 41 #include "content/public/browser/android/compositor.h" |
43 #include "content/public/browser/browser_context.h" | 42 #include "content/public/browser/browser_context.h" |
44 #include "content/public/browser/browser_thread.h" | 43 #include "content/public/browser/browser_thread.h" |
45 #include "content/public/browser/favicon_status.h" | 44 #include "content/public/browser/favicon_status.h" |
46 #include "content/public/browser/render_frame_host.h" | 45 #include "content/public/browser/render_frame_host.h" |
47 #include "content/public/browser/screen_orientation_dispatcher_host.h" | 46 #include "content/public/browser/screen_orientation_dispatcher_host.h" |
48 #include "content/public/browser/ssl_host_state_delegate.h" | 47 #include "content/public/browser/ssl_host_state_delegate.h" |
49 #include "content/public/browser/web_contents.h" | 48 #include "content/public/browser/web_contents.h" |
50 #include "content/public/common/content_client.h" | 49 #include "content/public/common/content_client.h" |
51 #include "content/public/common/content_switches.h" | 50 #include "content/public/common/content_switches.h" |
52 #include "content/public/common/menu_item.h" | 51 #include "content/public/common/menu_item.h" |
53 #include "content/public/common/user_agent.h" | 52 #include "content/public/common/user_agent.h" |
54 #include "device/geolocation/geolocation_service_context.h" | 53 #include "device/geolocation/geolocation_service_context.h" |
55 #include "jni/ContentViewCore_jni.h" | 54 #include "jni/ContentViewCore_jni.h" |
56 #include "jni/DragEvent_jni.h" | 55 #include "jni/DragEvent_jni.h" |
57 #include "third_party/WebKit/public/web/WebInputEvent.h" | 56 #include "third_party/WebKit/public/web/WebInputEvent.h" |
58 #include "ui/android/view_android.h" | 57 #include "ui/android/view_android.h" |
59 #include "ui/android/window_android.h" | 58 #include "ui/android/window_android.h" |
60 #include "ui/base/clipboard/clipboard.h" | 59 #include "ui/base/clipboard/clipboard.h" |
61 #include "ui/base/ui_base_switches_util.h" | 60 #include "ui/base/ui_base_switches_util.h" |
62 #include "ui/events/android/motion_event_android.h" | 61 #include "ui/events/android/motion_event_android.h" |
63 #include "ui/events/blink/blink_event_util.h" | 62 #include "ui/events/blink/blink_event_util.h" |
| 63 #include "ui/events/blink/web_input_event_traits.h" |
64 #include "ui/events/event_utils.h" | 64 #include "ui/events/event_utils.h" |
65 #include "ui/gfx/android/java_bitmap.h" | 65 #include "ui/gfx/android/java_bitmap.h" |
66 #include "ui/gfx/geometry/point_conversions.h" | 66 #include "ui/gfx/geometry/point_conversions.h" |
67 #include "ui/gfx/geometry/size_conversions.h" | 67 #include "ui/gfx/geometry/size_conversions.h" |
68 #include "ui/gfx/geometry/size_f.h" | 68 #include "ui/gfx/geometry/size_f.h" |
69 | 69 |
70 using base::android::AttachCurrentThread; | 70 using base::android::AttachCurrentThread; |
71 using base::android::ConvertJavaStringToUTF16; | 71 using base::android::ConvertJavaStringToUTF16; |
72 using base::android::ConvertJavaStringToUTF8; | 72 using base::android::ConvertJavaStringToUTF8; |
73 using base::android::ConvertUTF16ToJavaString; | 73 using base::android::ConvertUTF16ToJavaString; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 return GESTURE_EVENT_TYPE_LONG_TAP; | 148 return GESTURE_EVENT_TYPE_LONG_TAP; |
149 case WebInputEvent::GesturePinchBegin: | 149 case WebInputEvent::GesturePinchBegin: |
150 return GESTURE_EVENT_TYPE_PINCH_BEGIN; | 150 return GESTURE_EVENT_TYPE_PINCH_BEGIN; |
151 case WebInputEvent::GesturePinchEnd: | 151 case WebInputEvent::GesturePinchEnd: |
152 return GESTURE_EVENT_TYPE_PINCH_END; | 152 return GESTURE_EVENT_TYPE_PINCH_END; |
153 case WebInputEvent::GesturePinchUpdate: | 153 case WebInputEvent::GesturePinchUpdate: |
154 return GESTURE_EVENT_TYPE_PINCH_BY; | 154 return GESTURE_EVENT_TYPE_PINCH_BY; |
155 case WebInputEvent::GestureTwoFingerTap: | 155 case WebInputEvent::GestureTwoFingerTap: |
156 default: | 156 default: |
157 NOTREACHED() << "Invalid source gesture type: " | 157 NOTREACHED() << "Invalid source gesture type: " |
158 << WebInputEventTraits::GetName(type); | 158 << ui::WebInputEventTraits::GetName(type); |
159 return -1; | 159 return -1; |
160 } | 160 } |
161 } | 161 } |
162 | 162 |
163 } // namespace | 163 } // namespace |
164 | 164 |
165 // Enables a callback when the underlying WebContents is destroyed, to enable | 165 // Enables a callback when the underlying WebContents is destroyed, to enable |
166 // nulling the back-pointer. | 166 // nulling the back-pointer. |
167 class ContentViewCoreImpl::ContentViewUserData | 167 class ContentViewCoreImpl::ContentViewUserData |
168 : public base::SupportsUserData::Data { | 168 : public base::SupportsUserData::Data { |
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1588 return ScopedJavaLocalRef<jobject>(); | 1588 return ScopedJavaLocalRef<jobject>(); |
1589 | 1589 |
1590 return view->GetJavaObject(); | 1590 return view->GetJavaObject(); |
1591 } | 1591 } |
1592 | 1592 |
1593 bool RegisterContentViewCore(JNIEnv* env) { | 1593 bool RegisterContentViewCore(JNIEnv* env) { |
1594 return RegisterNativesImpl(env); | 1594 return RegisterNativesImpl(env); |
1595 } | 1595 } |
1596 | 1596 |
1597 } // namespace content | 1597 } // namespace content |
OLD | NEW |