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/view_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 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 } | 1319 } |
1319 | 1320 |
1320 void ContentViewCoreImpl::ShowImeIfNeeded(JNIEnv* env, jobject obj) { | 1321 void ContentViewCoreImpl::ShowImeIfNeeded(JNIEnv* env, jobject obj) { |
1321 RenderViewHost* host = web_contents_->GetRenderViewHost(); | 1322 RenderViewHost* host = web_contents_->GetRenderViewHost(); |
1322 host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID())); | 1323 host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID())); |
1323 } | 1324 } |
1324 | 1325 |
1325 void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env, | 1326 void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env, |
1326 jobject obj) { | 1327 jobject obj) { |
1327 RenderViewHost* host = web_contents_->GetRenderViewHost(); | 1328 RenderViewHost* host = web_contents_->GetRenderViewHost(); |
1328 host->Send(new ViewMsg_ScrollFocusedEditableNodeIntoRect(host->GetRoutingID(), | 1329 host->Send(new ViewInputMsg_ScrollFocusedEditableNodeIntoRect( |
1329 gfx::Rect())); | 1330 host->GetRoutingID(), gfx::Rect())); |
1330 } | 1331 } |
1331 | 1332 |
1332 namespace { | 1333 namespace { |
1333 | 1334 |
1334 static void AddNavigationEntryToHistory(JNIEnv* env, jobject obj, | 1335 static void AddNavigationEntryToHistory(JNIEnv* env, jobject obj, |
1335 jobject history, | 1336 jobject history, |
1336 NavigationEntry* entry, | 1337 NavigationEntry* entry, |
1337 int index) { | 1338 int index) { |
1338 // Get the details of the current entry | 1339 // Get the details of the current entry |
1339 ScopedJavaLocalRef<jstring> j_url( | 1340 ScopedJavaLocalRef<jstring> j_url( |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1542 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1542 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1543 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1543 return reinterpret_cast<jint>(view); | 1544 return reinterpret_cast<jint>(view); |
1544 } | 1545 } |
1545 | 1546 |
1546 bool RegisterContentViewCore(JNIEnv* env) { | 1547 bool RegisterContentViewCore(JNIEnv* env) { |
1547 return RegisterNativesImpl(env); | 1548 return RegisterNativesImpl(env); |
1548 } | 1549 } |
1549 | 1550 |
1550 } // namespace content | 1551 } // namespace content |
OLD | NEW |