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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
732 } | 732 } |
733 | 733 |
734 void AwContents::PostInvalidate() { | 734 void AwContents::PostInvalidate() { |
735 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 735 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
736 JNIEnv* env = AttachCurrentThread(); | 736 JNIEnv* env = AttachCurrentThread(); |
737 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 737 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
738 if (!obj.is_null()) | 738 if (!obj.is_null()) |
739 Java_AwContents_postInvalidateOnAnimation(env, obj.obj()); | 739 Java_AwContents_postInvalidateOnAnimation(env, obj.obj()); |
740 } | 740 } |
741 | 741 |
742 void AwContents::EnsureContinuousInvalidation(bool force_invalidate) { | |
743 browser_view_renderer_.EnsureContinuousInvalidation(force_invalidate); | |
boliu
2014/07/29 19:02:42
DCHECK thread
hush (inactive)
2014/07/29 21:14:21
Done.
| |
744 } | |
745 | |
742 void AwContents::OnNewPicture() { | 746 void AwContents::OnNewPicture() { |
743 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 747 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
744 JNIEnv* env = AttachCurrentThread(); | 748 JNIEnv* env = AttachCurrentThread(); |
745 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 749 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
746 if (!obj.is_null()) { | 750 if (!obj.is_null()) { |
747 devtools_instrumentation::ScopedEmbedderCallbackTask embedder_callback( | 751 devtools_instrumentation::ScopedEmbedderCallbackTask embedder_callback( |
748 "onNewPicture"); | 752 "onNewPicture"); |
749 Java_AwContents_onNewPicture(env, obj.obj()); | 753 Java_AwContents_onNewPicture(env, obj.obj()); |
750 } | 754 } |
751 } | 755 } |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1144 } | 1148 } |
1145 | 1149 |
1146 browser_view_renderer_.TrimMemory(level, visible); | 1150 browser_view_renderer_.TrimMemory(level, visible); |
1147 } | 1151 } |
1148 | 1152 |
1149 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { | 1153 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { |
1150 g_should_download_favicons = true; | 1154 g_should_download_favicons = true; |
1151 } | 1155 } |
1152 | 1156 |
1153 } // namespace android_webview | 1157 } // namespace android_webview |
OLD | NEW |