OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_io_thread_client_impl.h" | 5 #include "android_webview/native/aw_contents_io_thread_client_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 bool AwContentsIoThreadClientImpl::ShouldAcceptThirdPartyCookies() const { | 387 bool AwContentsIoThreadClientImpl::ShouldAcceptThirdPartyCookies() const { |
388 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 388 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
389 if (java_object_.is_null()) | 389 if (java_object_.is_null()) |
390 return false; | 390 return false; |
391 | 391 |
392 JNIEnv* env = AttachCurrentThread(); | 392 JNIEnv* env = AttachCurrentThread(); |
393 return Java_AwContentsIoThreadClient_shouldAcceptThirdPartyCookies( | 393 return Java_AwContentsIoThreadClient_shouldAcceptThirdPartyCookies( |
394 env, java_object_); | 394 env, java_object_); |
395 } | 395 } |
396 | 396 |
| 397 bool AwContentsIoThreadClientImpl::GetSafeBrowsingEnabled() const { |
| 398 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 399 if (java_object_.is_null()) |
| 400 return false; |
| 401 |
| 402 JNIEnv* env = AttachCurrentThread(); |
| 403 return Java_AwContentsIoThreadClient_getSafeBrowsingEnabled(env, |
| 404 java_object_); |
| 405 } |
| 406 |
397 bool AwContentsIoThreadClientImpl::ShouldBlockNetworkLoads() const { | 407 bool AwContentsIoThreadClientImpl::ShouldBlockNetworkLoads() const { |
398 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 408 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
399 if (java_object_.is_null()) | 409 if (java_object_.is_null()) |
400 return false; | 410 return false; |
401 | 411 |
402 JNIEnv* env = AttachCurrentThread(); | 412 JNIEnv* env = AttachCurrentThread(); |
403 return Java_AwContentsIoThreadClient_shouldBlockNetworkLoads(env, | 413 return Java_AwContentsIoThreadClient_shouldBlockNetworkLoads(env, |
404 java_object_); | 414 java_object_); |
405 } | 415 } |
406 | 416 |
407 } // namespace android_webview | 417 } // namespace android_webview |
OLD | NEW |