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

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

Issue 238043003: WebView: RegisterNativesImpl() returns bool; don't compare it for >= 0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « android_webview/native/aw_autofill_manager_delegate.cc ('k') | android_webview/native/aw_contents_client_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698