| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/web_contents/web_contents_android.h" | 5 #include "content/browser/web_contents/web_contents_android.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 const JavaParamRef<jobject>& obj) { | 422 const JavaParamRef<jobject>& obj) { |
| 423 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); | 423 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
| 424 return view && view->HasValidFrame(); | 424 return view && view->HasValidFrame(); |
| 425 } | 425 } |
| 426 | 426 |
| 427 void WebContentsAndroid::ExitFullscreen(JNIEnv* env, | 427 void WebContentsAndroid::ExitFullscreen(JNIEnv* env, |
| 428 const JavaParamRef<jobject>& obj) { | 428 const JavaParamRef<jobject>& obj) { |
| 429 web_contents_->ExitFullscreen(/*will_cause_resize=*/false); | 429 web_contents_->ExitFullscreen(/*will_cause_resize=*/false); |
| 430 } | 430 } |
| 431 | 431 |
| 432 void WebContentsAndroid::UpdateTopControlsState( | 432 void WebContentsAndroid::UpdateBrowserControlsState( |
| 433 JNIEnv* env, | 433 JNIEnv* env, |
| 434 const JavaParamRef<jobject>& obj, | 434 const JavaParamRef<jobject>& obj, |
| 435 bool enable_hiding, | 435 bool enable_hiding, |
| 436 bool enable_showing, | 436 bool enable_showing, |
| 437 bool animate) { | 437 bool animate) { |
| 438 RenderViewHost* host = web_contents_->GetRenderViewHost(); | 438 RenderViewHost* host = web_contents_->GetRenderViewHost(); |
| 439 if (!host) | 439 if (!host) |
| 440 return; | 440 return; |
| 441 host->Send(new ViewMsg_UpdateTopControlsState(host->GetRoutingID(), | 441 host->Send(new ViewMsg_UpdateBrowserControlsState( |
| 442 enable_hiding, | 442 host->GetRoutingID(), enable_hiding, enable_showing, animate)); |
| 443 enable_showing, | |
| 444 animate)); | |
| 445 } | 443 } |
| 446 | 444 |
| 447 void WebContentsAndroid::ShowImeIfNeeded(JNIEnv* env, | 445 void WebContentsAndroid::ShowImeIfNeeded(JNIEnv* env, |
| 448 const JavaParamRef<jobject>& obj) { | 446 const JavaParamRef<jobject>& obj) { |
| 449 RenderViewHost* host = web_contents_->GetRenderViewHost(); | 447 RenderViewHost* host = web_contents_->GetRenderViewHost(); |
| 450 if (!host) | 448 if (!host) |
| 451 return; | 449 return; |
| 452 host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID())); | 450 host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID())); |
| 453 } | 451 } |
| 454 | 452 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 Java_WebContentsImpl_addToBitmapList(env, jbitmaps, jbitmap); | 725 Java_WebContentsImpl_addToBitmapList(env, jbitmaps, jbitmap); |
| 728 } | 726 } |
| 729 for (const gfx::Size& size : sizes) { | 727 for (const gfx::Size& size : sizes) { |
| 730 Java_WebContentsImpl_createSizeAndAddToList(env, jsizes, size.width(), | 728 Java_WebContentsImpl_createSizeAndAddToList(env, jsizes, size.width(), |
| 731 size.height()); | 729 size.height()); |
| 732 } | 730 } |
| 733 Java_WebContentsImpl_onDownloadImageFinished( | 731 Java_WebContentsImpl_onDownloadImageFinished( |
| 734 env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes); | 732 env, *obj, *callback, id, http_status_code, jurl, jbitmaps, jsizes); |
| 735 } | 733 } |
| 736 } // namespace content | 734 } // namespace content |
| OLD | NEW |