| 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 15 matching lines...) Expand all Loading... |
| 26 #include "content/browser/android/interstitial_page_delegate_android.h" | 26 #include "content/browser/android/interstitial_page_delegate_android.h" |
| 27 #include "content/browser/android/java/gin_java_bridge_dispatcher_host.h" | 27 #include "content/browser/android/java/gin_java_bridge_dispatcher_host.h" |
| 28 #include "content/browser/android/load_url_params.h" | 28 #include "content/browser/android/load_url_params.h" |
| 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/render_view_host_impl.h" | 33 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 34 #include "content/browser/renderer_host/render_widget_host_impl.h" | 34 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 35 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 35 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
| 36 #include "content/browser/screen_orientation/screen_orientation.h" |
| 36 #include "content/browser/web_contents/web_contents_view_android.h" | 37 #include "content/browser/web_contents/web_contents_view_android.h" |
| 37 #include "content/common/frame_messages.h" | 38 #include "content/common/frame_messages.h" |
| 38 #include "content/common/input_messages.h" | 39 #include "content/common/input_messages.h" |
| 39 #include "content/common/view_messages.h" | 40 #include "content/common/view_messages.h" |
| 40 #include "content/public/browser/android/compositor.h" | 41 #include "content/public/browser/android/compositor.h" |
| 41 #include "content/public/browser/browser_context.h" | 42 #include "content/public/browser/browser_context.h" |
| 42 #include "content/public/browser/browser_thread.h" | 43 #include "content/public/browser/browser_thread.h" |
| 43 #include "content/public/browser/favicon_status.h" | 44 #include "content/public/browser/favicon_status.h" |
| 44 #include "content/public/browser/render_frame_host.h" | 45 #include "content/public/browser/render_frame_host.h" |
| 45 #include "content/public/browser/screen_orientation_dispatcher_host.h" | 46 #include "content/public/browser/screen_orientation_provider.h" |
| 46 #include "content/public/browser/ssl_host_state_delegate.h" | 47 #include "content/public/browser/ssl_host_state_delegate.h" |
| 47 #include "content/public/browser/web_contents.h" | 48 #include "content/public/browser/web_contents.h" |
| 48 #include "content/public/common/content_client.h" | 49 #include "content/public/common/content_client.h" |
| 49 #include "content/public/common/content_switches.h" | 50 #include "content/public/common/content_switches.h" |
| 50 #include "content/public/common/menu_item.h" | 51 #include "content/public/common/menu_item.h" |
| 51 #include "content/public/common/user_agent.h" | 52 #include "content/public/common/user_agent.h" |
| 52 #include "device/geolocation/geolocation_service_context.h" | 53 #include "device/geolocation/geolocation_service_context.h" |
| 53 #include "jni/ContentViewCore_jni.h" | 54 #include "jni/ContentViewCore_jni.h" |
| 54 #include "jni/DragEvent_jni.h" | 55 #include "jni/DragEvent_jni.h" |
| 55 #include "third_party/WebKit/public/web/WebInputEvent.h" | 56 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| (...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 accessibility_state->accessibility_mode()); | 1350 accessibility_state->accessibility_mode()); |
| 1350 } | 1351 } |
| 1351 } | 1352 } |
| 1352 } | 1353 } |
| 1353 | 1354 |
| 1354 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { | 1355 void ContentViewCoreImpl::SendOrientationChangeEventInternal() { |
| 1355 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); | 1356 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); |
| 1356 if (rwhv) | 1357 if (rwhv) |
| 1357 rwhv->UpdateScreenInfo(GetViewAndroid()); | 1358 rwhv->UpdateScreenInfo(GetViewAndroid()); |
| 1358 | 1359 |
| 1359 static_cast<WebContentsImpl*>(web_contents())-> | 1360 static_cast<WebContentsImpl*>(web_contents()) |
| 1360 screen_orientation_dispatcher_host()->OnOrientationChange(); | 1361 ->GetScreenOrientationProvider() |
| 1362 ->OnOrientationChange(); |
| 1361 } | 1363 } |
| 1362 | 1364 |
| 1363 void ContentViewCoreImpl::ExtractSmartClipData(JNIEnv* env, | 1365 void ContentViewCoreImpl::ExtractSmartClipData(JNIEnv* env, |
| 1364 const JavaParamRef<jobject>& obj, | 1366 const JavaParamRef<jobject>& obj, |
| 1365 jint x, | 1367 jint x, |
| 1366 jint y, | 1368 jint y, |
| 1367 jint width, | 1369 jint width, |
| 1368 jint height) { | 1370 jint height) { |
| 1369 gfx::Rect rect( | 1371 gfx::Rect rect( |
| 1370 static_cast<int>(x / dpi_scale()), | 1372 static_cast<int>(x / dpi_scale()), |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 return ScopedJavaLocalRef<jobject>(); | 1573 return ScopedJavaLocalRef<jobject>(); |
| 1572 | 1574 |
| 1573 return view->GetJavaObject(); | 1575 return view->GetJavaObject(); |
| 1574 } | 1576 } |
| 1575 | 1577 |
| 1576 bool RegisterContentViewCore(JNIEnv* env) { | 1578 bool RegisterContentViewCore(JNIEnv* env) { |
| 1577 return RegisterNativesImpl(env); | 1579 return RegisterNativesImpl(env); |
| 1578 } | 1580 } |
| 1579 | 1581 |
| 1580 } // namespace content | 1582 } // namespace content |
| OLD | NEW |