| 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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 void AwContents::FocusFirstNode(JNIEnv* env, jobject obj) { | 969 void AwContents::FocusFirstNode(JNIEnv* env, jobject obj) { |
| 970 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 970 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 971 web_contents_->FocusThroughTabTraversal(false); | 971 web_contents_->FocusThroughTabTraversal(false); |
| 972 } | 972 } |
| 973 | 973 |
| 974 void AwContents::SetBackgroundColor(JNIEnv* env, jobject obj, jint color) { | 974 void AwContents::SetBackgroundColor(JNIEnv* env, jobject obj, jint color) { |
| 975 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 975 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 976 render_view_host_ext_->SetBackgroundColor(color); | 976 render_view_host_ext_->SetBackgroundColor(color); |
| 977 } | 977 } |
| 978 | 978 |
| 979 void AwContents::SetHasTransparentBackground( | |
| 980 JNIEnv* env, jobject obj, bool transparent) { | |
| 981 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
| 982 browser_view_renderer_.SetHasTransparentBackground(transparent); | |
| 983 } | |
| 984 | |
| 985 jlong AwContents::ReleasePopupAwContents(JNIEnv* env, jobject obj) { | 979 jlong AwContents::ReleasePopupAwContents(JNIEnv* env, jobject obj) { |
| 986 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 980 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 987 return reinterpret_cast<intptr_t>(pending_contents_.release()); | 981 return reinterpret_cast<intptr_t>(pending_contents_.release()); |
| 988 } | 982 } |
| 989 | 983 |
| 990 gfx::Point AwContents::GetLocationOnScreen() { | 984 gfx::Point AwContents::GetLocationOnScreen() { |
| 991 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 985 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 992 JNIEnv* env = AttachCurrentThread(); | 986 JNIEnv* env = AttachCurrentThread(); |
| 993 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 987 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
| 994 if (obj.is_null()) | 988 if (obj.is_null()) |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 jboolean visible) { | 1134 jboolean visible) { |
| 1141 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1135 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 1142 browser_view_renderer_.TrimMemory(level, visible); | 1136 browser_view_renderer_.TrimMemory(level, visible); |
| 1143 } | 1137 } |
| 1144 | 1138 |
| 1145 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { | 1139 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { |
| 1146 g_should_download_favicons = true; | 1140 g_should_download_favicons = true; |
| 1147 } | 1141 } |
| 1148 | 1142 |
| 1149 } // namespace android_webview | 1143 } // namespace android_webview |
| OLD | NEW |