| 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 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 base::TimeTicks::FromInternalValue(timebase_micros), | 1237 base::TimeTicks::FromInternalValue(timebase_micros), |
| 1238 base::TimeDelta::FromMicroseconds(interval_micros)); | 1238 base::TimeDelta::FromMicroseconds(interval_micros)); |
| 1239 } | 1239 } |
| 1240 | 1240 |
| 1241 void ContentViewCoreImpl::OnVSync(JNIEnv* env, jobject /* obj */, | 1241 void ContentViewCoreImpl::OnVSync(JNIEnv* env, jobject /* obj */, |
| 1242 jlong frame_time_micros) { | 1242 jlong frame_time_micros) { |
| 1243 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); | 1243 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
| 1244 if (!view) | 1244 if (!view) |
| 1245 return; | 1245 return; |
| 1246 | 1246 |
| 1247 view->SendVSync(base::TimeTicks::FromInternalValue(frame_time_micros)); | 1247 view->SendBeginFrame( |
| 1248 base::TimeTicks::FromInternalValue(frame_time_micros)); |
| 1248 } | 1249 } |
| 1249 | 1250 |
| 1250 jboolean ContentViewCoreImpl::OnAnimate(JNIEnv* env, jobject /* obj */, | 1251 jboolean ContentViewCoreImpl::OnAnimate(JNIEnv* env, jobject /* obj */, |
| 1251 jlong frame_time_micros) { | 1252 jlong frame_time_micros) { |
| 1252 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); | 1253 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
| 1253 if (!view) | 1254 if (!view) |
| 1254 return false; | 1255 return false; |
| 1255 | 1256 |
| 1256 return view->Animate(base::TimeTicks::FromInternalValue(frame_time_micros)); | 1257 return view->Animate(base::TimeTicks::FromInternalValue(frame_time_micros)); |
| 1257 } | 1258 } |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1563 reinterpret_cast<ui::ViewAndroid*>(view_android), |
| 1563 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1564 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
| 1564 return reinterpret_cast<jint>(view); | 1565 return reinterpret_cast<jint>(view); |
| 1565 } | 1566 } |
| 1566 | 1567 |
| 1567 bool RegisterContentViewCore(JNIEnv* env) { | 1568 bool RegisterContentViewCore(JNIEnv* env) { |
| 1568 return RegisterNativesImpl(env); | 1569 return RegisterNativesImpl(env); |
| 1569 } | 1570 } |
| 1570 | 1571 |
| 1571 } // namespace content | 1572 } // namespace content |
| OLD | NEW |