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 "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" | 31 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" |
32 #include "content/browser/renderer_host/render_view_host_impl.h" | 32 #include "content/browser/renderer_host/render_view_host_impl.h" |
33 #include "content/browser/renderer_host/render_widget_host_impl.h" | 33 #include "content/browser/renderer_host/render_widget_host_impl.h" |
34 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 34 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
35 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host.
h" | 35 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host.
h" |
36 #include "content/browser/ssl/ssl_host_state.h" | 36 #include "content/browser/ssl/ssl_host_state.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/input/web_input_event_traits.h" | 38 #include "content/common/input/web_input_event_traits.h" |
39 #include "content/common/input_messages.h" | 39 #include "content/common/input_messages.h" |
40 #include "content/common/view_messages.h" | 40 #include "content/common/view_messages.h" |
41 #include "content/public/browser/android/external_video_surface_container.h" | |
42 #include "content/public/browser/browser_accessibility_state.h" | 41 #include "content/public/browser/browser_accessibility_state.h" |
43 #include "content/public/browser/browser_context.h" | 42 #include "content/public/browser/browser_context.h" |
44 #include "content/public/browser/favicon_status.h" | 43 #include "content/public/browser/favicon_status.h" |
45 #include "content/public/browser/notification_details.h" | 44 #include "content/public/browser/notification_details.h" |
46 #include "content/public/browser/notification_service.h" | 45 #include "content/public/browser/notification_service.h" |
47 #include "content/public/browser/notification_source.h" | 46 #include "content/public/browser/notification_source.h" |
48 #include "content/public/browser/notification_types.h" | 47 #include "content/public/browser/notification_types.h" |
49 #include "content/public/browser/render_frame_host.h" | 48 #include "content/public/browser/render_frame_host.h" |
50 #include "content/public/browser/web_contents.h" | 49 #include "content/public/browser/web_contents.h" |
51 #include "content/public/common/content_client.h" | 50 #include "content/public/common/content_client.h" |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 page_scale_factor, | 481 page_scale_factor, |
483 page_scale_factor_limits.x(), | 482 page_scale_factor_limits.x(), |
484 page_scale_factor_limits.y(), | 483 page_scale_factor_limits.y(), |
485 content_size.width(), | 484 content_size.width(), |
486 content_size.height(), | 485 content_size.height(), |
487 viewport_size.width(), | 486 viewport_size.width(), |
488 viewport_size.height(), | 487 viewport_size.height(), |
489 controls_offset.y(), | 488 controls_offset.y(), |
490 content_offset.y(), | 489 content_offset.y(), |
491 overdraw_bottom_height); | 490 overdraw_bottom_height); |
492 #if defined(VIDEO_HOLE) | |
493 ExternalVideoSurfaceContainer* surface_container = | |
494 ExternalVideoSurfaceContainer::FromWebContents(web_contents_); | |
495 if (surface_container) | |
496 surface_container->OnFrameInfoUpdated(); | |
497 #endif // defined(VIDEO_HOLE) | |
498 } | 491 } |
499 | 492 |
500 void ContentViewCoreImpl::SetTitle(const base::string16& title) { | 493 void ContentViewCoreImpl::SetTitle(const base::string16& title) { |
501 JNIEnv* env = AttachCurrentThread(); | 494 JNIEnv* env = AttachCurrentThread(); |
502 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 495 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
503 if (obj.is_null()) | 496 if (obj.is_null()) |
504 return; | 497 return; |
505 ScopedJavaLocalRef<jstring> jtitle = | 498 ScopedJavaLocalRef<jstring> jtitle = |
506 ConvertUTF8ToJavaString(env, base::UTF16ToUTF8(title)); | 499 ConvertUTF8ToJavaString(env, base::UTF16ToUTF8(title)); |
507 Java_ContentViewCore_setTitle(env, obj.obj(), jtitle.obj()); | 500 Java_ContentViewCore_setTitle(env, obj.obj(), jtitle.obj()); |
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1795 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1788 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1796 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1789 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1797 return reinterpret_cast<intptr_t>(view); | 1790 return reinterpret_cast<intptr_t>(view); |
1798 } | 1791 } |
1799 | 1792 |
1800 bool RegisterContentViewCore(JNIEnv* env) { | 1793 bool RegisterContentViewCore(JNIEnv* env) { |
1801 return RegisterNativesImpl(env); | 1794 return RegisterNativesImpl(env); |
1802 } | 1795 } |
1803 | 1796 |
1804 } // namespace content | 1797 } // namespace content |
OLD | NEW |