| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 void WebContentsAndroid::SelectAll(JNIEnv* env, | 319 void WebContentsAndroid::SelectAll(JNIEnv* env, |
| 320 const JavaParamRef<jobject>& obj) { | 320 const JavaParamRef<jobject>& obj) { |
| 321 web_contents_->SelectAll(); | 321 web_contents_->SelectAll(); |
| 322 } | 322 } |
| 323 | 323 |
| 324 void WebContentsAndroid::Unselect(JNIEnv* env, | 324 void WebContentsAndroid::Unselect(JNIEnv* env, |
| 325 const JavaParamRef<jobject>& obj) { | 325 const JavaParamRef<jobject>& obj) { |
| 326 web_contents_->Unselect(); | 326 web_contents_->Unselect(); |
| 327 } | 327 } |
| 328 | 328 |
| 329 void WebContentsAndroid::InsertCSS(JNIEnv* env, | |
| 330 const JavaParamRef<jobject>& jobj, | |
| 331 const JavaParamRef<jstring>& jcss) { | |
| 332 web_contents_->InsertCSS(base::android::ConvertJavaStringToUTF8(env, jcss)); | |
| 333 } | |
| 334 | |
| 335 RenderWidgetHostViewAndroid* | 329 RenderWidgetHostViewAndroid* |
| 336 WebContentsAndroid::GetRenderWidgetHostViewAndroid() { | 330 WebContentsAndroid::GetRenderWidgetHostViewAndroid() { |
| 337 RenderWidgetHostView* rwhv = NULL; | 331 RenderWidgetHostView* rwhv = NULL; |
| 338 rwhv = web_contents_->GetRenderWidgetHostView(); | 332 rwhv = web_contents_->GetRenderWidgetHostView(); |
| 339 if (web_contents_->ShowingInterstitialPage()) { | 333 if (web_contents_->ShowingInterstitialPage()) { |
| 340 rwhv = web_contents_->GetInterstitialPage() | 334 rwhv = web_contents_->GetInterstitialPage() |
| 341 ->GetMainFrame() | 335 ->GetMainFrame() |
| 342 ->GetRenderViewHost() | 336 ->GetRenderViewHost() |
| 343 ->GetWidget() | 337 ->GetWidget() |
| 344 ->GetView(); | 338 ->GetView(); |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 } | 726 } |
| 733 for (const gfx::Size& size : sizes) { | 727 for (const gfx::Size& size : sizes) { |
| 734 Java_WebContentsImpl_createSizeAndAddToList( | 728 Java_WebContentsImpl_createSizeAndAddToList( |
| 735 env, jsizes.obj(), size.width(), size.height()); | 729 env, jsizes.obj(), size.width(), size.height()); |
| 736 } | 730 } |
| 737 Java_WebContentsImpl_onDownloadImageFinished( | 731 Java_WebContentsImpl_onDownloadImageFinished( |
| 738 env, obj->obj(), callback->obj(), id, | 732 env, obj->obj(), callback->obj(), id, |
| 739 http_status_code, jurl.obj(), jbitmaps.obj(), jsizes.obj()); | 733 http_status_code, jurl.obj(), jbitmaps.obj(), jsizes.obj()); |
| 740 } | 734 } |
| 741 } // namespace content | 735 } // namespace content |
| OLD | NEW |