| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 } | 233 } |
| 234 | 234 |
| 235 return web_contents_android->GetJavaObject(); | 235 return web_contents_android->GetJavaObject(); |
| 236 } | 236 } |
| 237 | 237 |
| 238 // static | 238 // static |
| 239 bool WebContentsAndroid::Register(JNIEnv* env) { | 239 bool WebContentsAndroid::Register(JNIEnv* env) { |
| 240 return RegisterNativesImpl(env); | 240 return RegisterNativesImpl(env); |
| 241 } | 241 } |
| 242 | 242 |
| 243 WebContentsAndroid::WebContentsAndroid(WebContents* web_contents) | 243 WebContentsAndroid::WebContentsAndroid(WebContentsImpl* web_contents) |
| 244 : web_contents_(web_contents), | 244 : web_contents_(web_contents), |
| 245 navigation_controller_(&(web_contents->GetController())), | 245 navigation_controller_(&(web_contents->GetController())), |
| 246 synchronous_compositor_client_(nullptr), | 246 synchronous_compositor_client_(nullptr), |
| 247 weak_factory_(this) { | 247 weak_factory_(this) { |
| 248 g_allocated_web_contents_androids.Get().insert(this); | 248 g_allocated_web_contents_androids.Get().insert(this); |
| 249 JNIEnv* env = AttachCurrentThread(); | 249 JNIEnv* env = AttachCurrentThread(); |
| 250 obj_.Reset(env, | 250 obj_.Reset(env, |
| 251 Java_WebContentsImpl_create( | 251 Java_WebContentsImpl_create( |
| 252 env, | 252 env, |
| 253 reinterpret_cast<intptr_t>(this), | 253 reinterpret_cast<intptr_t>(this), |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 if (response == READBACK_SUCCESS) | 692 if (response == READBACK_SUCCESS) |
| 693 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap); | 693 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap); |
| 694 Java_WebContentsImpl_onGetContentBitmapFinished(env, | 694 Java_WebContentsImpl_onGetContentBitmapFinished(env, |
| 695 obj->obj(), | 695 obj->obj(), |
| 696 callback->obj(), | 696 callback->obj(), |
| 697 java_bitmap.obj(), | 697 java_bitmap.obj(), |
| 698 response); | 698 response); |
| 699 } | 699 } |
| 700 | 700 |
| 701 } // namespace content | 701 } // namespace content |
| OLD | NEW |