| 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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 void AwContents::OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h) { | 856 void AwContents::OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h) { |
| 857 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 857 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 858 browser_view_renderer_.OnAttachedToWindow(w, h); | 858 browser_view_renderer_.OnAttachedToWindow(w, h); |
| 859 } | 859 } |
| 860 | 860 |
| 861 void AwContents::OnDetachedFromWindow(JNIEnv* env, jobject obj) { | 861 void AwContents::OnDetachedFromWindow(JNIEnv* env, jobject obj) { |
| 862 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 862 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 863 browser_view_renderer_.OnDetachedFromWindow(); | 863 browser_view_renderer_.OnDetachedFromWindow(); |
| 864 } | 864 } |
| 865 | 865 |
| 866 bool AwContents::IsVisible(JNIEnv* env, jobject obj) { |
| 867 return browser_view_renderer_.IsVisible(); |
| 868 } |
| 869 |
| 866 void AwContents::DetachFunctorFromView() { | 870 void AwContents::DetachFunctorFromView() { |
| 867 JNIEnv* env = AttachCurrentThread(); | 871 JNIEnv* env = AttachCurrentThread(); |
| 868 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 872 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
| 869 if (!obj.is_null()) | 873 if (!obj.is_null()) |
| 870 Java_AwContents_detachFunctorFromView(env, obj.obj()); | 874 Java_AwContents_detachFunctorFromView(env, obj.obj()); |
| 871 } | 875 } |
| 872 | 876 |
| 873 base::android::ScopedJavaLocalRef<jbyteArray> | 877 base::android::ScopedJavaLocalRef<jbyteArray> |
| 874 AwContents::GetOpaqueState(JNIEnv* env, jobject obj) { | 878 AwContents::GetOpaqueState(JNIEnv* env, jobject obj) { |
| 875 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 879 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( | 1220 content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme( |
| 1217 web_contents_->GetRenderProcessHost()->GetID(), url::kFileScheme); | 1221 web_contents_->GetRenderProcessHost()->GetID(), url::kFileScheme); |
| 1218 } | 1222 } |
| 1219 | 1223 |
| 1220 void SetShouldDownloadFavicons(JNIEnv* env, | 1224 void SetShouldDownloadFavicons(JNIEnv* env, |
| 1221 const JavaParamRef<jclass>& jclazz) { | 1225 const JavaParamRef<jclass>& jclazz) { |
| 1222 g_should_download_favicons = true; | 1226 g_should_download_favicons = true; |
| 1223 } | 1227 } |
| 1224 | 1228 |
| 1225 } // namespace android_webview | 1229 } // namespace android_webview |
| OLD | NEW |