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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 for (itr = visited_link_strings.begin(); itr != visited_link_strings.end(); | 474 for (itr = visited_link_strings.begin(); itr != visited_link_strings.end(); |
475 ++itr) { | 475 ++itr) { |
476 visited_link_gurls.push_back(GURL(*itr)); | 476 visited_link_gurls.push_back(GURL(*itr)); |
477 } | 477 } |
478 | 478 |
479 AwBrowserContext::FromWebContents(web_contents_.get()) | 479 AwBrowserContext::FromWebContents(web_contents_.get()) |
480 ->AddVisitedURLs(visited_link_gurls); | 480 ->AddVisitedURLs(visited_link_gurls); |
481 } | 481 } |
482 | 482 |
483 bool RegisterAwContents(JNIEnv* env) { | 483 bool RegisterAwContents(JNIEnv* env) { |
484 return RegisterNativesImpl(env) >= 0; | 484 return RegisterNativesImpl(env); |
485 } | 485 } |
486 | 486 |
487 namespace { | 487 namespace { |
488 | 488 |
489 void ShowGeolocationPromptHelperTask(const JavaObjectWeakGlobalRef& java_ref, | 489 void ShowGeolocationPromptHelperTask(const JavaObjectWeakGlobalRef& java_ref, |
490 const GURL& origin) { | 490 const GURL& origin) { |
491 JNIEnv* env = AttachCurrentThread(); | 491 JNIEnv* env = AttachCurrentThread(); |
492 ScopedJavaLocalRef<jobject> j_ref = java_ref.get(env); | 492 ScopedJavaLocalRef<jobject> j_ref = java_ref.get(env); |
493 if (j_ref.obj()) { | 493 if (j_ref.obj()) { |
494 ScopedJavaLocalRef<jstring> j_origin( | 494 ScopedJavaLocalRef<jstring> j_origin( |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 | 1061 |
1062 void AwContents::ForceFakeComposite() { | 1062 void AwContents::ForceFakeComposite() { |
1063 browser_view_renderer_.ForceFakeCompositeSW(); | 1063 browser_view_renderer_.ForceFakeCompositeSW(); |
1064 } | 1064 } |
1065 | 1065 |
1066 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { | 1066 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { |
1067 g_should_download_favicons = true; | 1067 g_should_download_favicons = true; |
1068 } | 1068 } |
1069 | 1069 |
1070 } // namespace android_webview | 1070 } // namespace android_webview |
OLD | NEW |