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 "android_webview/native/aw_contents.h" | 5 #include "android_webview/native/aw_contents.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "android_webview/browser/aw_browser_context.h" | 9 #include "android_webview/browser/aw_browser_context.h" |
10 #include "android_webview/browser/aw_browser_main_parts.h" | 10 #include "android_webview/browser/aw_browser_main_parts.h" |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 } | 744 } |
745 | 745 |
746 void AwContents::PostInvalidate() { | 746 void AwContents::PostInvalidate() { |
747 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 747 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
748 JNIEnv* env = AttachCurrentThread(); | 748 JNIEnv* env = AttachCurrentThread(); |
749 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 749 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
750 if (!obj.is_null()) | 750 if (!obj.is_null()) |
751 Java_AwContents_postInvalidateOnAnimation(env, obj.obj()); | 751 Java_AwContents_postInvalidateOnAnimation(env, obj.obj()); |
752 } | 752 } |
753 | 753 |
| 754 void AwContents::UpdateParentDrawConstraints() { |
| 755 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 756 browser_view_renderer_.UpdateParentDrawConstraints(); |
| 757 } |
| 758 |
754 void AwContents::OnNewPicture() { | 759 void AwContents::OnNewPicture() { |
755 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 760 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
756 JNIEnv* env = AttachCurrentThread(); | 761 JNIEnv* env = AttachCurrentThread(); |
757 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 762 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
758 if (!obj.is_null()) { | 763 if (!obj.is_null()) { |
759 devtools_instrumentation::ScopedEmbedderCallbackTask embedder_callback( | 764 devtools_instrumentation::ScopedEmbedderCallbackTask embedder_callback( |
760 "onNewPicture"); | 765 "onNewPicture"); |
761 Java_AwContents_onNewPicture(env, obj.obj()); | 766 Java_AwContents_onNewPicture(env, obj.obj()); |
762 } | 767 } |
763 } | 768 } |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 } | 1161 } |
1157 | 1162 |
1158 browser_view_renderer_.TrimMemory(level, visible); | 1163 browser_view_renderer_.TrimMemory(level, visible); |
1159 } | 1164 } |
1160 | 1165 |
1161 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { | 1166 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { |
1162 g_should_download_favicons = true; | 1167 g_should_download_favicons = true; |
1163 } | 1168 } |
1164 | 1169 |
1165 } // namespace android_webview | 1170 } // namespace android_webview |
OLD | NEW |