OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 12 matching lines...) Expand all Loading... |
23 #include "content/browser/renderer_host/java/java_bound_object.h" | 23 #include "content/browser/renderer_host/java/java_bound_object.h" |
24 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" | 24 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" |
25 #include "content/browser/renderer_host/render_view_host_impl.h" | 25 #include "content/browser/renderer_host/render_view_host_impl.h" |
26 #include "content/browser/renderer_host/render_widget_host_impl.h" | 26 #include "content/browser/renderer_host/render_widget_host_impl.h" |
27 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 27 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
28 #include "content/browser/ssl/ssl_host_state.h" | 28 #include "content/browser/ssl/ssl_host_state.h" |
29 #include "content/browser/web_contents/interstitial_page_impl.h" | 29 #include "content/browser/web_contents/interstitial_page_impl.h" |
30 #include "content/browser/web_contents/navigation_controller_impl.h" | 30 #include "content/browser/web_contents/navigation_controller_impl.h" |
31 #include "content/browser/web_contents/navigation_entry_impl.h" | 31 #include "content/browser/web_contents/navigation_entry_impl.h" |
32 #include "content/browser/web_contents/web_contents_view_android.h" | 32 #include "content/browser/web_contents/web_contents_view_android.h" |
| 33 #include "content/common/input_messages.h" |
33 #include "content/common/view_messages.h" | 34 #include "content/common/view_messages.h" |
34 #include "content/public/browser/browser_context.h" | 35 #include "content/public/browser/browser_context.h" |
35 #include "content/public/browser/favicon_status.h" | 36 #include "content/public/browser/favicon_status.h" |
36 #include "content/public/browser/notification_details.h" | 37 #include "content/public/browser/notification_details.h" |
37 #include "content/public/browser/notification_service.h" | 38 #include "content/public/browser/notification_service.h" |
38 #include "content/public/browser/notification_source.h" | 39 #include "content/public/browser/notification_source.h" |
39 #include "content/public/browser/notification_types.h" | 40 #include "content/public/browser/notification_types.h" |
40 #include "content/public/browser/web_contents.h" | 41 #include "content/public/browser/web_contents.h" |
41 #include "content/public/common/content_client.h" | 42 #include "content/public/common/content_client.h" |
42 #include "content/public/common/content_switches.h" | 43 #include "content/public/common/content_switches.h" |
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 } | 1303 } |
1303 | 1304 |
1304 void ContentViewCoreImpl::ShowImeIfNeeded(JNIEnv* env, jobject obj) { | 1305 void ContentViewCoreImpl::ShowImeIfNeeded(JNIEnv* env, jobject obj) { |
1305 RenderViewHost* host = web_contents_->GetRenderViewHost(); | 1306 RenderViewHost* host = web_contents_->GetRenderViewHost(); |
1306 host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID())); | 1307 host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID())); |
1307 } | 1308 } |
1308 | 1309 |
1309 void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env, | 1310 void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env, |
1310 jobject obj) { | 1311 jobject obj) { |
1311 RenderViewHost* host = web_contents_->GetRenderViewHost(); | 1312 RenderViewHost* host = web_contents_->GetRenderViewHost(); |
1312 host->Send(new ViewMsg_ScrollFocusedEditableNodeIntoRect(host->GetRoutingID(), | 1313 host->Send(new InputMsg_ScrollFocusedEditableNodeIntoRect( |
1313 gfx::Rect())); | 1314 host->GetRoutingID(), gfx::Rect())); |
1314 } | 1315 } |
1315 | 1316 |
1316 namespace { | 1317 namespace { |
1317 | 1318 |
1318 static void AddNavigationEntryToHistory(JNIEnv* env, jobject obj, | 1319 static void AddNavigationEntryToHistory(JNIEnv* env, jobject obj, |
1319 jobject history, | 1320 jobject history, |
1320 NavigationEntry* entry, | 1321 NavigationEntry* entry, |
1321 int index) { | 1322 int index) { |
1322 // Get the details of the current entry | 1323 // Get the details of the current entry |
1323 ScopedJavaLocalRef<jstring> j_url( | 1324 ScopedJavaLocalRef<jstring> j_url( |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1525 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1526 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1526 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1527 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1527 return reinterpret_cast<jint>(view); | 1528 return reinterpret_cast<jint>(view); |
1528 } | 1529 } |
1529 | 1530 |
1530 bool RegisterContentViewCore(JNIEnv* env) { | 1531 bool RegisterContentViewCore(JNIEnv* env) { |
1531 return RegisterNativesImpl(env); | 1532 return RegisterNativesImpl(env); |
1532 } | 1533 } |
1533 | 1534 |
1534 } // namespace content | 1535 } // namespace content |
OLD | NEW |