Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: android_webview/native/aw_contents.cc

Issue 368273008: [WebView] Fix issue with transparent background. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698