| 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 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 RenderViewHost* host = web_contents_->GetRenderViewHost(); | 1234 RenderViewHost* host = web_contents_->GetRenderViewHost(); |
| 1235 host->ExitFullscreen(); | 1235 host->ExitFullscreen(); |
| 1236 } | 1236 } |
| 1237 | 1237 |
| 1238 void ContentViewCoreImpl::EnableHidingTopControls(JNIEnv* env, jobject obj, | 1238 void ContentViewCoreImpl::EnableHidingTopControls(JNIEnv* env, jobject obj, |
| 1239 bool enable) { | 1239 bool enable) { |
| 1240 RenderViewHost* host = web_contents_->GetRenderViewHost(); | 1240 RenderViewHost* host = web_contents_->GetRenderViewHost(); |
| 1241 host->Send(new ViewMsg_EnableHidingTopControls(host->GetRoutingID(), enable)); | 1241 host->Send(new ViewMsg_EnableHidingTopControls(host->GetRoutingID(), enable)); |
| 1242 } | 1242 } |
| 1243 | 1243 |
| 1244 void ContentViewCoreImpl::ShowTopControls(JNIEnv* env, jobject obj, bool show) { |
| 1245 RenderViewHost* host = web_contents_->GetRenderViewHost(); |
| 1246 host->Send(new ViewMsg_ShowTopControls(host->GetRoutingID(), show)); |
| 1247 } |
| 1248 |
| 1244 void ContentViewCoreImpl::ShowImeIfNeeded(JNIEnv* env, jobject obj) { | 1249 void ContentViewCoreImpl::ShowImeIfNeeded(JNIEnv* env, jobject obj) { |
| 1245 RenderViewHost* host = web_contents_->GetRenderViewHost(); | 1250 RenderViewHost* host = web_contents_->GetRenderViewHost(); |
| 1246 host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID())); | 1251 host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID())); |
| 1247 } | 1252 } |
| 1248 | 1253 |
| 1249 void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env, | 1254 void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env, |
| 1250 jobject obj) { | 1255 jobject obj) { |
| 1251 RenderViewHost* host = web_contents_->GetRenderViewHost(); | 1256 RenderViewHost* host = web_contents_->GetRenderViewHost(); |
| 1252 host->Send(new ViewMsg_ScrollFocusedEditableNodeIntoRect(host->GetRoutingID(), | 1257 host->Send(new ViewMsg_ScrollFocusedEditableNodeIntoRect(host->GetRoutingID(), |
| 1253 gfx::Rect())); | 1258 gfx::Rect())); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1455 reinterpret_cast<WebContents*>(native_web_contents), | 1460 reinterpret_cast<WebContents*>(native_web_contents), |
| 1456 reinterpret_cast<ui::WindowAndroid*>(native_window)); | 1461 reinterpret_cast<ui::WindowAndroid*>(native_window)); |
| 1457 return reinterpret_cast<jint>(view); | 1462 return reinterpret_cast<jint>(view); |
| 1458 } | 1463 } |
| 1459 | 1464 |
| 1460 bool RegisterContentViewCore(JNIEnv* env) { | 1465 bool RegisterContentViewCore(JNIEnv* env) { |
| 1461 return RegisterNativesImpl(env); | 1466 return RegisterNativesImpl(env); |
| 1462 } | 1467 } |
| 1463 | 1468 |
| 1464 } // namespace content | 1469 } // namespace content |
| OLD | NEW |