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" |
39 #include "content/browser/transition_request_manager.h" | 40 #include "content/browser/transition_request_manager.h" |
40 #include "content/browser/web_contents/web_contents_view_android.h" | 41 #include "content/browser/web_contents/web_contents_view_android.h" |
41 #include "content/common/frame_messages.h" | 42 #include "content/common/frame_messages.h" |
42 #include "content/common/input/web_input_event_traits.h" | 43 #include "content/common/input/web_input_event_traits.h" |
43 #include "content/common/input_messages.h" | 44 #include "content/common/input_messages.h" |
44 #include "content/common/view_messages.h" | 45 #include "content/common/view_messages.h" |
45 #include "content/public/browser/browser_context.h" | 46 #include "content/public/browser/browser_context.h" |
46 #include "content/public/browser/browser_thread.h" | 47 #include "content/public/browser/browser_thread.h" |
47 #include "content/public/browser/favicon_status.h" | 48 #include "content/public/browser/favicon_status.h" |
48 #include "content/public/browser/render_frame_host.h" | 49 #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 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1406 jstring_text.obj(), | 1406 jstring_text.obj(), |
1407 selection_start, | 1407 selection_start, |
1408 selection_end, | 1408 selection_end, |
1409 composition_start, | 1409 composition_start, |
1410 composition_end, | 1410 composition_end, |
1411 show_ime_if_needed, | 1411 show_ime_if_needed, |
1412 is_non_ime_change); | 1412 is_non_ime_change); |
1413 } | 1413 } |
1414 | 1414 |
1415 void ContentViewCoreImpl::ClearSslPreferences(JNIEnv* env, jobject obj) { | 1415 void ContentViewCoreImpl::ClearSslPreferences(JNIEnv* env, jobject obj) { |
1416 content::SSLHostStateDelegate* delegate = | 1416 SSLHostState* state = SSLHostState::GetFor( |
1417 web_contents_-> | 1417 web_contents_->GetController().GetBrowserContext()); |
1418 GetController(). | 1418 state->Clear(); |
1419 GetBrowserContext()-> | |
1420 GetSSLHostStateDelegate(); | |
1421 if (delegate) | |
1422 delegate->Clear(); | |
1423 } | 1419 } |
1424 | 1420 |
1425 void ContentViewCoreImpl::SetUseDesktopUserAgent( | 1421 void ContentViewCoreImpl::SetUseDesktopUserAgent( |
1426 JNIEnv* env, | 1422 JNIEnv* env, |
1427 jobject obj, | 1423 jobject obj, |
1428 jboolean enabled, | 1424 jboolean enabled, |
1429 jboolean reload_on_state_change) { | 1425 jboolean reload_on_state_change) { |
1430 if (GetUseDesktopUserAgent(env, obj) == enabled) | 1426 if (GetUseDesktopUserAgent(env, obj) == enabled) |
1431 return; | 1427 return; |
1432 | 1428 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1572 reinterpret_cast<ui::WindowAndroid*>(window_android), | 1568 reinterpret_cast<ui::WindowAndroid*>(window_android), |
1573 retained_objects_set); | 1569 retained_objects_set); |
1574 return reinterpret_cast<intptr_t>(view); | 1570 return reinterpret_cast<intptr_t>(view); |
1575 } | 1571 } |
1576 | 1572 |
1577 bool RegisterContentViewCore(JNIEnv* env) { | 1573 bool RegisterContentViewCore(JNIEnv* env) { |
1578 return RegisterNativesImpl(env); | 1574 return RegisterNativesImpl(env); |
1579 } | 1575 } |
1580 | 1576 |
1581 } // namespace content | 1577 } // namespace content |
OLD | NEW |