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 18 matching lines...) Expand all Loading... |
29 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | 29 #include "content/browser/geolocation/geolocation_dispatcher_host.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/motion_event_android.h" | 32 #include "content/browser/renderer_host/input/motion_event_android.h" |
33 #include "content/browser/renderer_host/input/web_input_event_builders_android.h
" | 33 #include "content/browser/renderer_host/input/web_input_event_builders_android.h
" |
34 #include "content/browser/renderer_host/input/web_input_event_util.h" | 34 #include "content/browser/renderer_host/input/web_input_event_util.h" |
35 #include "content/browser/renderer_host/render_view_host_impl.h" | 35 #include "content/browser/renderer_host/render_view_host_impl.h" |
36 #include "content/browser/renderer_host/render_widget_host_impl.h" | 36 #include "content/browser/renderer_host/render_widget_host_impl.h" |
37 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 37 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
38 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host.
h" | 38 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host.
h" |
39 #include "content/browser/ssl/ssl_host_state.h" | |
40 #include "content/browser/transition_request_manager.h" | 39 #include "content/browser/transition_request_manager.h" |
41 #include "content/browser/web_contents/web_contents_view_android.h" | 40 #include "content/browser/web_contents/web_contents_view_android.h" |
42 #include "content/common/frame_messages.h" | 41 #include "content/common/frame_messages.h" |
43 #include "content/common/input/web_input_event_traits.h" | 42 #include "content/common/input/web_input_event_traits.h" |
44 #include "content/common/input_messages.h" | 43 #include "content/common/input_messages.h" |
45 #include "content/common/view_messages.h" | 44 #include "content/common/view_messages.h" |
46 #include "content/public/browser/browser_context.h" | 45 #include "content/public/browser/browser_context.h" |
47 #include "content/public/browser/browser_thread.h" | 46 #include "content/public/browser/browser_thread.h" |
48 #include "content/public/browser/favicon_status.h" | 47 #include "content/public/browser/favicon_status.h" |
49 #include "content/public/browser/render_frame_host.h" | 48 #include "content/public/browser/render_frame_host.h" |
| 49 #include "content/public/browser/ssl_host_state_delegate.h" |
50 #include "content/public/browser/web_contents.h" | 50 #include "content/public/browser/web_contents.h" |
51 #include "content/public/common/content_client.h" | 51 #include "content/public/common/content_client.h" |
52 #include "content/public/common/content_switches.h" | 52 #include "content/public/common/content_switches.h" |
53 #include "content/public/common/menu_item.h" | 53 #include "content/public/common/menu_item.h" |
54 #include "content/public/common/page_transition_types.h" | 54 #include "content/public/common/page_transition_types.h" |
55 #include "content/public/common/user_agent.h" | 55 #include "content/public/common/user_agent.h" |
56 #include "jni/ContentViewCore_jni.h" | 56 #include "jni/ContentViewCore_jni.h" |
57 #include "third_party/WebKit/public/web/WebInputEvent.h" | 57 #include "third_party/WebKit/public/web/WebInputEvent.h" |
58 #include "ui/base/android/view_android.h" | 58 #include "ui/base/android/view_android.h" |
59 #include "ui/base/android/window_android.h" | 59 #include "ui/base/android/window_android.h" |
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 ScopedJavaLocalRef<jstring> jstring_text = ConvertUTF8ToJavaString(env, text); | 1401 ScopedJavaLocalRef<jstring> jstring_text = ConvertUTF8ToJavaString(env, text); |
1402 Java_ContentViewCore_updateImeAdapter(env, obj.obj(), | 1402 Java_ContentViewCore_updateImeAdapter(env, obj.obj(), |
1403 native_ime_adapter, text_input_type, | 1403 native_ime_adapter, text_input_type, |
1404 jstring_text.obj(), | 1404 jstring_text.obj(), |
1405 selection_start, selection_end, | 1405 selection_start, selection_end, |
1406 composition_start, composition_end, | 1406 composition_start, composition_end, |
1407 show_ime_if_needed, is_non_ime_change); | 1407 show_ime_if_needed, is_non_ime_change); |
1408 } | 1408 } |
1409 | 1409 |
1410 void ContentViewCoreImpl::ClearSslPreferences(JNIEnv* env, jobject obj) { | 1410 void ContentViewCoreImpl::ClearSslPreferences(JNIEnv* env, jobject obj) { |
1411 SSLHostState* state = SSLHostState::GetFor( | 1411 web_contents_->GetController(). |
1412 web_contents_->GetController().GetBrowserContext()); | 1412 GetBrowserContext()-> |
1413 state->Clear(); | 1413 GetSSLHostStateDelegate()-> |
| 1414 Clear(); |
1414 } | 1415 } |
1415 | 1416 |
1416 void ContentViewCoreImpl::SetUseDesktopUserAgent( | 1417 void ContentViewCoreImpl::SetUseDesktopUserAgent( |
1417 JNIEnv* env, | 1418 JNIEnv* env, |
1418 jobject obj, | 1419 jobject obj, |
1419 jboolean enabled, | 1420 jboolean enabled, |
1420 jboolean reload_on_state_change) { | 1421 jboolean reload_on_state_change) { |
1421 if (GetUseDesktopUserAgent(env, obj) == enabled) | 1422 if (GetUseDesktopUserAgent(env, obj) == enabled) |
1422 return; | 1423 return; |
1423 | 1424 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1637 reinterpret_cast<ui::WindowAndroid*>(window_android), | 1638 reinterpret_cast<ui::WindowAndroid*>(window_android), |
1638 retained_objects_set); | 1639 retained_objects_set); |
1639 return reinterpret_cast<intptr_t>(view); | 1640 return reinterpret_cast<intptr_t>(view); |
1640 } | 1641 } |
1641 | 1642 |
1642 bool RegisterContentViewCore(JNIEnv* env) { | 1643 bool RegisterContentViewCore(JNIEnv* env) { |
1643 return RegisterNativesImpl(env); | 1644 return RegisterNativesImpl(env); |
1644 } | 1645 } |
1645 | 1646 |
1646 } // namespace content | 1647 } // namespace content |
OLD | NEW |