OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1365 jlong frame_time_micros) { | 1365 jlong frame_time_micros) { |
1366 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); | 1366 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
1367 if (!view) | 1367 if (!view) |
1368 return false; | 1368 return false; |
1369 | 1369 |
1370 return view->Animate(base::TimeTicks::FromInternalValue(frame_time_micros)); | 1370 return view->Animate(base::TimeTicks::FromInternalValue(frame_time_micros)); |
1371 } | 1371 } |
1372 | 1372 |
1373 void ContentViewCoreImpl::WasResized(JNIEnv* env, jobject obj) { | 1373 void ContentViewCoreImpl::WasResized(JNIEnv* env, jobject obj) { |
1374 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); | 1374 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
1375 if (view) | 1375 if (view) { |
1376 RenderWidgetHostImpl* host = RenderWidgetHostImpl::From( | |
jdduke (slow)
2014/04/22 19:27:25
I'm probably not the best reviewer for this, but c
| |
1377 view->GetRenderWidgetHost()); | |
1378 host->SendScreenRects(); | |
1376 view->WasResized(); | 1379 view->WasResized(); |
1380 } | |
1377 } | 1381 } |
1378 | 1382 |
1379 void ContentViewCoreImpl::ShowInterstitialPage( | 1383 void ContentViewCoreImpl::ShowInterstitialPage( |
1380 JNIEnv* env, jobject obj, jstring jurl, jlong delegate_ptr) { | 1384 JNIEnv* env, jobject obj, jstring jurl, jlong delegate_ptr) { |
1381 GURL url(base::android::ConvertJavaStringToUTF8(env, jurl)); | 1385 GURL url(base::android::ConvertJavaStringToUTF8(env, jurl)); |
1382 InterstitialPageDelegateAndroid* delegate = | 1386 InterstitialPageDelegateAndroid* delegate = |
1383 reinterpret_cast<InterstitialPageDelegateAndroid*>(delegate_ptr); | 1387 reinterpret_cast<InterstitialPageDelegateAndroid*>(delegate_ptr); |
1384 InterstitialPage* interstitial = InterstitialPage::Create( | 1388 InterstitialPage* interstitial = InterstitialPage::Create( |
1385 web_contents_, false, url, delegate); | 1389 web_contents_, false, url, delegate); |
1386 delegate->set_interstitial_page(interstitial); | 1390 delegate->set_interstitial_page(interstitial); |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1736 reinterpret_cast<ui::ViewAndroid*>(view_android), | 1740 reinterpret_cast<ui::ViewAndroid*>(view_android), |
1737 reinterpret_cast<ui::WindowAndroid*>(window_android)); | 1741 reinterpret_cast<ui::WindowAndroid*>(window_android)); |
1738 return reinterpret_cast<intptr_t>(view); | 1742 return reinterpret_cast<intptr_t>(view); |
1739 } | 1743 } |
1740 | 1744 |
1741 bool RegisterContentViewCore(JNIEnv* env) { | 1745 bool RegisterContentViewCore(JNIEnv* env) { |
1742 return RegisterNativesImpl(env); | 1746 return RegisterNativesImpl(env); |
1743 } | 1747 } |
1744 | 1748 |
1745 } // namespace content | 1749 } // namespace content |
OLD | NEW |