diff options
author | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-20 20:39:10 +0000 |
---|---|---|
committer | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-20 20:39:10 +0000 |
commit | 8c3ce8d82d114a8f1f18be61ff6494faa6d29507 (patch) | |
tree | 5a3cfbc0c57a0069f30e9f77d4266c2284ed997a /chrome/browser | |
parent | e5bcc76bb050fa903fe93c50e3534fb2d7a6a65f (diff) | |
download | chromium_src-8c3ce8d82d114a8f1f18be61ff6494faa6d29507.zip chromium_src-8c3ce8d82d114a8f1f18be61ff6494faa6d29507.tar.gz chromium_src-8c3ce8d82d114a8f1f18be61ff6494faa6d29507.tar.bz2 |
Android: moves chrome/ to use long for JNI
BUG=317523
Review URL: https://codereview.chromium.org/67573003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236278 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
33 files changed, 63 insertions, 63 deletions
diff --git a/chrome/browser/android/bookmarks/bookmarks_bridge.cc b/chrome/browser/android/bookmarks/bookmarks_bridge.cc index 576652b..1e6ddf9 100644 --- a/chrome/browser/android/bookmarks/bookmarks_bridge.cc +++ b/chrome/browser/android/bookmarks/bookmarks_bridge.cc @@ -75,9 +75,9 @@ bool BookmarksBridge::RegisterBookmarksBridge(JNIEnv* env) { return RegisterNativesImpl(env); } -static jint Init(JNIEnv* env, jobject obj, jobject j_profile) { +static jlong Init(JNIEnv* env, jobject obj, jobject j_profile) { BookmarksBridge* delegate = new BookmarksBridge(env, obj, j_profile); - return reinterpret_cast<jint>(delegate); + return reinterpret_cast<intptr_t>(delegate); } static bool IsEditBookmarksEnabled() { diff --git a/chrome/browser/android/chrome_web_contents_delegate_android.cc b/chrome/browser/android/chrome_web_contents_delegate_android.cc index 3c5f49d..3db2bfc 100644 --- a/chrome/browser/android/chrome_web_contents_delegate_android.cc +++ b/chrome/browser/android/chrome_web_contents_delegate_android.cc @@ -307,8 +307,8 @@ void ChromeWebContentsDelegateAndroid::AddNewContents( handled = Java_ChromeWebContentsDelegateAndroid_addNewContents( env, obj.obj(), - reinterpret_cast<jint>(source), - reinterpret_cast<jint>(new_contents), + reinterpret_cast<intptr_t>(source), + reinterpret_cast<intptr_t>(new_contents), static_cast<jint>(disposition), NULL, user_gesture); diff --git a/chrome/browser/android/content_view_util.cc b/chrome/browser/android/content_view_util.cc index 2acdb1e..95ab743 100644 --- a/chrome/browser/android/content_view_util.cc +++ b/chrome/browser/android/content_view_util.cc @@ -11,7 +11,7 @@ #include "content/public/browser/web_contents.h" #include "jni/ContentViewUtil_jni.h" -static jint CreateNativeWebContents( +static jlong CreateNativeWebContents( JNIEnv* env, jclass clazz, jboolean incognito) { Profile* profile = g_browser_process->profile_manager()->GetLastUsedProfile(); if (incognito) @@ -19,11 +19,11 @@ static jint CreateNativeWebContents( content::WebContents* web_contents = content::WebContents::Create(content::WebContents::CreateParams(profile)); - return reinterpret_cast<jint>(web_contents); + return reinterpret_cast<intptr_t>(web_contents); } static void DestroyNativeWebContents( - JNIEnv* env, jclass clazz, jint web_contents_ptr) { + JNIEnv* env, jclass clazz, jlong web_contents_ptr) { content::WebContents* web_contents = reinterpret_cast<content::WebContents*>(web_contents_ptr); delete web_contents; diff --git a/chrome/browser/android/favicon_helper.cc b/chrome/browser/android/favicon_helper.cc index 17a4660..2413dde 100644 --- a/chrome/browser/android/favicon_helper.cc +++ b/chrome/browser/android/favicon_helper.cc @@ -58,8 +58,8 @@ void OnLocalFaviconAvailable( } // namespace -static jint Init(JNIEnv* env, jclass clazz) { - return reinterpret_cast<jint>(new FaviconHelper()); +static jlong Init(JNIEnv* env, jclass clazz) { + return reinterpret_cast<intptr_t>(new FaviconHelper()); } FaviconHelper::FaviconHelper() { diff --git a/chrome/browser/android/foreign_session_helper.cc b/chrome/browser/android/foreign_session_helper.cc index 58a4675..4fccf57 100644 --- a/chrome/browser/android/foreign_session_helper.cc +++ b/chrome/browser/android/foreign_session_helper.cc @@ -137,10 +137,10 @@ void CopyWindowsToJava( } // namespace -static jint Init(JNIEnv* env, jclass clazz, jobject profile) { +static jlong Init(JNIEnv* env, jclass clazz, jobject profile) { ForeignSessionHelper* foreign_session_helper = new ForeignSessionHelper( ProfileAndroid::FromProfileAndroid(profile)); - return reinterpret_cast<jint>(foreign_session_helper); + return reinterpret_cast<intptr_t>(foreign_session_helper); } ForeignSessionHelper::ForeignSessionHelper(Profile* profile) diff --git a/chrome/browser/android/new_tab_page_prefs.cc b/chrome/browser/android/new_tab_page_prefs.cc index be28961..94a4e75 100644 --- a/chrome/browser/android/new_tab_page_prefs.cc +++ b/chrome/browser/android/new_tab_page_prefs.cc @@ -16,10 +16,10 @@ using base::android::ConvertJavaStringToUTF8; -static jint Init(JNIEnv* env, jclass clazz, jobject profile) { +static jlong Init(JNIEnv* env, jclass clazz, jobject profile) { NewTabPagePrefs* new_tab_page_prefs = new NewTabPagePrefs(ProfileAndroid::FromProfileAndroid(profile)); - return reinterpret_cast<jint>(new_tab_page_prefs); + return reinterpret_cast<intptr_t>(new_tab_page_prefs); } NewTabPagePrefs::NewTabPagePrefs(Profile* profile) diff --git a/chrome/browser/android/omnibox/omnibox_prerender.cc b/chrome/browser/android/omnibox/omnibox_prerender.cc index 216a719..ac06465 100644 --- a/chrome/browser/android/omnibox/omnibox_prerender.cc +++ b/chrome/browser/android/omnibox/omnibox_prerender.cc @@ -27,9 +27,9 @@ OmniboxPrerender::OmniboxPrerender(JNIEnv* env, jobject obj) OmniboxPrerender::~OmniboxPrerender() { } -static jint Init(JNIEnv* env, jobject obj) { +static jlong Init(JNIEnv* env, jobject obj) { OmniboxPrerender* omnibox = new OmniboxPrerender(env, obj); - return reinterpret_cast<jint>(omnibox); + return reinterpret_cast<intptr_t>(omnibox); } bool RegisterOmniboxPrerender(JNIEnv* env) { diff --git a/chrome/browser/android/password_ui_view_android.cc b/chrome/browser/android/password_ui_view_android.cc index 966e7f5..c5db384 100644 --- a/chrome/browser/android/password_ui_view_android.cc +++ b/chrome/browser/android/password_ui_view_android.cc @@ -86,9 +86,9 @@ void PasswordUIViewAndroid::HandleRemoveSavedPasswordException( } // static -static jint Init(JNIEnv* env, jobject obj) { +static jlong Init(JNIEnv* env, jobject obj) { PasswordUIViewAndroid* controller = new PasswordUIViewAndroid(env, obj); - return reinterpret_cast<jint>(controller); + return reinterpret_cast<intptr_t>(controller); } bool PasswordUIViewAndroid::RegisterPasswordUIViewAndroid(JNIEnv* env) { diff --git a/chrome/browser/android/provider/chrome_browser_provider.cc b/chrome/browser/android/provider/chrome_browser_provider.cc index 800effc..fdad6c8 100644 --- a/chrome/browser/android/provider/chrome_browser_provider.cc +++ b/chrome/browser/android/provider/chrome_browser_provider.cc @@ -1143,9 +1143,9 @@ void FillSearchRow(JNIEnv* env, // ------------- Native initialization and destruction ------------- // -static jint Init(JNIEnv* env, jobject obj) { +static jlong Init(JNIEnv* env, jobject obj) { ChromeBrowserProvider* provider = new ChromeBrowserProvider(env, obj); - return reinterpret_cast<jint>(provider); + return reinterpret_cast<intptr_t>(provider); } bool ChromeBrowserProvider::RegisterChromeBrowserProvider(JNIEnv* env) { diff --git a/chrome/browser/android/recently_closed_tabs_bridge.cc b/chrome/browser/android/recently_closed_tabs_bridge.cc index fd72173..636e25a 100644 --- a/chrome/browser/android/recently_closed_tabs_bridge.cc +++ b/chrome/browser/android/recently_closed_tabs_bridge.cc @@ -153,10 +153,10 @@ void RecentlyClosedTabsBridge::EnsureTabRestoreService() { } } -static jint Init(JNIEnv* env, jobject obj, jobject jprofile) { +static jlong Init(JNIEnv* env, jobject obj, jobject jprofile) { RecentlyClosedTabsBridge* bridge = new RecentlyClosedTabsBridge( ProfileAndroid::FromProfileAndroid(jprofile)); - return reinterpret_cast<jint>(bridge); + return reinterpret_cast<intptr_t>(bridge); } // static diff --git a/chrome/browser/android/shortcut_helper.cc b/chrome/browser/android/shortcut_helper.cc index 562d2a9..8025b93 100644 --- a/chrome/browser/android/shortcut_helper.cc +++ b/chrome/browser/android/shortcut_helper.cc @@ -205,7 +205,7 @@ void ShortcutHelper::AddShortcutInBackground( // its otherwise inaccessible WebContents. static void AddShortcut(JNIEnv* env, jclass clazz, - jint tab_android_ptr, + jlong tab_android_ptr, jstring title, jint launcher_large_icon_size) { TabAndroid* tab = reinterpret_cast<TabAndroid*>(tab_android_ptr); diff --git a/chrome/browser/android/signin/signin_manager_android.cc b/chrome/browser/android/signin/signin_manager_android.cc index ac761d4..8cd2b7e 100644 --- a/chrome/browser/android/signin/signin_manager_android.cc +++ b/chrome/browser/android/signin/signin_manager_android.cc @@ -210,10 +210,10 @@ void SigninManagerAndroid::LogInSignedInUser(JNIEnv* env, jobject obj) { autoLogin->LogIn(); } -static int Init(JNIEnv* env, jobject obj) { +static jlong Init(JNIEnv* env, jobject obj) { SigninManagerAndroid* signin_manager_android = new SigninManagerAndroid(env, obj); - return reinterpret_cast<jint>(signin_manager_android); + return reinterpret_cast<intptr_t>(signin_manager_android); } static jboolean ShouldLoadPolicyForUser(JNIEnv* env, diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc index ce9805a..3a5bb7a 100644 --- a/chrome/browser/android/tab_android.cc +++ b/chrome/browser/android/tab_android.cc @@ -147,7 +147,7 @@ TabAndroid::TabAndroid(JNIEnv* env, jobject obj) : weak_java_tab_(env, obj), session_tab_id_(), synced_tab_delegate_(new browser_sync::SyncedTabDelegateAndroid(this)) { - Java_TabBase_setNativePtr(env, obj, reinterpret_cast<jint>(this)); + Java_TabBase_setNativePtr(env, obj, reinterpret_cast<intptr_t>(this)); } TabAndroid::~TabAndroid() { @@ -245,7 +245,7 @@ void TabAndroid::SwapTabContents(content::WebContents* old_contents, Java_TabBase_swapWebContents( env, weak_java_tab_.get(env).obj(), - reinterpret_cast<jint>(new_contents)); + reinterpret_cast<intptr_t>(new_contents)); } void TabAndroid::Observe(int type, diff --git a/chrome/browser/autofill/android/personal_data_manager_android.cc b/chrome/browser/autofill/android/personal_data_manager_android.cc index b0f6049..364ccad 100644 --- a/chrome/browser/autofill/android/personal_data_manager_android.cc +++ b/chrome/browser/autofill/android/personal_data_manager_android.cc @@ -313,10 +313,10 @@ static jstring ToCountryCode(JNIEnv* env, jclass clazz, jstring jcountry_name) { g_browser_process->GetApplicationLocale())).Release(); } -static jint Init(JNIEnv* env, jobject obj) { +static jlong Init(JNIEnv* env, jobject obj) { PersonalDataManagerAndroid* personal_data_manager_android = new PersonalDataManagerAndroid(env, obj); - return reinterpret_cast<jint>(personal_data_manager_android); + return reinterpret_cast<intptr_t>(personal_data_manager_android); } } // namespace autofill diff --git a/chrome/browser/history/android/sqlite_cursor.cc b/chrome/browser/history/android/sqlite_cursor.cc index 4bf584a..36cc882 100644 --- a/chrome/browser/history/android/sqlite_cursor.cc +++ b/chrome/browser/history/android/sqlite_cursor.cc @@ -55,7 +55,7 @@ ScopedJavaLocalRef<jobject> SQLiteCursor::NewJavaSqliteCursor( FaviconService* favicon_service) { SQLiteCursor* cursor = new SQLiteCursor(column_names, statement, service, favicon_service); - return Java_SQLiteCursor_create(env, reinterpret_cast<jint>(cursor)); + return Java_SQLiteCursor_create(env, reinterpret_cast<intptr_t>(cursor)); } bool SQLiteCursor::RegisterSqliteCursor(JNIEnv* env) { diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc index 10be12a..497d4cb 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc @@ -291,8 +291,8 @@ std::string DataReductionProxySettingsAndroid::GetProxyPacScript() { } // Used by generated jni code. -static jint Init(JNIEnv* env, jobject obj) { +static jlong Init(JNIEnv* env, jobject obj) { DataReductionProxySettingsAndroid* settings = new DataReductionProxySettingsAndroid(env, obj); - return reinterpret_cast<jint>(settings); + return reinterpret_cast<intptr_t>(settings); } diff --git a/chrome/browser/prerender/external_prerender_handler_android.cc b/chrome/browser/prerender/external_prerender_handler_android.cc index 1a0a06b..013873b 100644 --- a/chrome/browser/prerender/external_prerender_handler_android.cc +++ b/chrome/browser/prerender/external_prerender_handler_android.cc @@ -25,7 +25,7 @@ namespace prerender { bool ExternalPrerenderHandlerAndroid::AddPrerender(JNIEnv* env, jobject obj, jobject jprofile, - jint web_contents_ptr, + jlong web_contents_ptr, jstring jurl, jstring jreferrer, jint width, @@ -72,7 +72,7 @@ static jboolean HasPrerenderedUrl(JNIEnv* env, jclass clazz, jobject jprofile, jstring jurl, - jint web_contents_ptr) { + jlong web_contents_ptr) { if (jurl == NULL) return false; @@ -93,10 +93,10 @@ ExternalPrerenderHandlerAndroid::ExternalPrerenderHandlerAndroid() {} ExternalPrerenderHandlerAndroid::~ExternalPrerenderHandlerAndroid() {} -static jint Init(JNIEnv* env, jclass clazz) { +static jlong Init(JNIEnv* env, jclass clazz) { ExternalPrerenderHandlerAndroid* external_handler = new ExternalPrerenderHandlerAndroid(); - return reinterpret_cast<jint>(external_handler); + return reinterpret_cast<intptr_t>(external_handler); } bool ExternalPrerenderHandlerAndroid::RegisterExternalPrerenderHandlerAndroid( diff --git a/chrome/browser/prerender/external_prerender_handler_android.h b/chrome/browser/prerender/external_prerender_handler_android.h index f7dedb4..111181c 100644 --- a/chrome/browser/prerender/external_prerender_handler_android.h +++ b/chrome/browser/prerender/external_prerender_handler_android.h @@ -30,7 +30,7 @@ class ExternalPrerenderHandlerAndroid { bool AddPrerender(JNIEnv* env, jobject obj, jobject profile, - jint web_content_ptr, + jlong web_content_ptr, jstring url, jstring referrer, jint width, diff --git a/chrome/browser/profiles/profile_android.cc b/chrome/browser/profiles/profile_android.cc index 5f0eda1..0496675 100644 --- a/chrome/browser/profiles/profile_android.cc +++ b/chrome/browser/profiles/profile_android.cc @@ -72,7 +72,7 @@ ProfileAndroid::ProfileAndroid(Profile* profile) : profile_(profile) { JNIEnv* env = AttachCurrentThread(); base::android::ScopedJavaLocalRef<jobject> jprofile = - Java_Profile_create(env, reinterpret_cast<int>(this)); + Java_Profile_create(env, reinterpret_cast<intptr_t>(this)); obj_.Reset(env, jprofile.obj()); } diff --git a/chrome/browser/search_engines/template_url_service_android.cc b/chrome/browser/search_engines/template_url_service_android.cc index 783725b..7bd4172 100644 --- a/chrome/browser/search_engines/template_url_service_android.cc +++ b/chrome/browser/search_engines/template_url_service_android.cc @@ -175,10 +175,10 @@ TemplateUrlServiceAndroid::ReplaceSearchTermsInUrl(JNIEnv* env, return base::android::ScopedJavaLocalRef<jstring>(env, NULL); } -static jint Init(JNIEnv* env, jobject obj) { +static jlong Init(JNIEnv* env, jobject obj) { TemplateUrlServiceAndroid* template_url_service_android = new TemplateUrlServiceAndroid(env, obj); - return reinterpret_cast<jint>(template_url_service_android); + return reinterpret_cast<intptr_t>(template_url_service_android); } // static diff --git a/chrome/browser/signin/android_profile_oauth2_token_service.cc b/chrome/browser/signin/android_profile_oauth2_token_service.cc index 60d378d..ae44714 100644 --- a/chrome/browser/signin/android_profile_oauth2_token_service.cc +++ b/chrome/browser/signin/android_profile_oauth2_token_service.cc @@ -53,7 +53,7 @@ typedef base::Callback<void( AndroidProfileOAuth2TokenService::AndroidProfileOAuth2TokenService() { JNIEnv* env = AttachCurrentThread(); base::android::ScopedJavaLocalRef<jobject> local_java_ref = - Java_OAuth2TokenService_create(env, reinterpret_cast<int>(this)); + Java_OAuth2TokenService_create(env, reinterpret_cast<intptr_t>(this)); java_ref_.Reset(env, local_java_ref.obj()); } @@ -129,7 +129,7 @@ void AndroidProfileOAuth2TokenService::FetchOAuth2Token( env, base::android::GetApplicationContext(), j_username.obj(), j_scope.obj(), - reinterpret_cast<int>(heap_callback.release())); + reinterpret_cast<intptr_t>(heap_callback.release())); } void AndroidProfileOAuth2TokenService::InvalidateOAuth2Token( @@ -235,7 +235,7 @@ void AndroidProfileOAuth2TokenService::FireRefreshTokensLoaded() { void OAuth2TokenFetched(JNIEnv* env, jclass clazz, jstring authToken, jboolean result, - jint nativeCallback) { + jlong nativeCallback) { std::string token = ConvertJavaStringToUTF8(env, authToken); scoped_ptr<FetchOAuth2TokenCallback> heap_callback( reinterpret_cast<FetchOAuth2TokenCallback*>(nativeCallback)); diff --git a/chrome/browser/speech/tts_android.cc b/chrome/browser/speech/tts_android.cc index 5fbc53b..2ff6eb2 100644 --- a/chrome/browser/speech/tts_android.cc +++ b/chrome/browser/speech/tts_android.cc @@ -24,7 +24,7 @@ TtsPlatformImplAndroid::TtsPlatformImplAndroid() JNIEnv* env = AttachCurrentThread(); java_ref_.Reset( Java_TtsPlatformImpl_create(env, - reinterpret_cast<jint>(this), + reinterpret_cast<intptr_t>(this), base::android::GetApplicationContext())); } diff --git a/chrome/browser/sync/profile_sync_service_android.cc b/chrome/browser/sync/profile_sync_service_android.cc index 0ab68f2..b1f82f7 100644 --- a/chrome/browser/sync/profile_sync_service_android.cc +++ b/chrome/browser/sync/profile_sync_service_android.cc @@ -501,11 +501,11 @@ ProfileSyncServiceAndroid* AttachCurrentThread(), base::android::GetApplicationContext())); } -static int Init(JNIEnv* env, jobject obj) { +static jlong Init(JNIEnv* env, jobject obj) { ProfileSyncServiceAndroid* profile_sync_service_android = new ProfileSyncServiceAndroid(env, obj); profile_sync_service_android->Init(); - return reinterpret_cast<jint>(profile_sync_service_android); + return reinterpret_cast<intptr_t>(profile_sync_service_android); } // static diff --git a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc index 09b4d9e..066c000 100644 --- a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc +++ b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc @@ -307,7 +307,7 @@ void AutofillDialogControllerAndroid::Show() { env, source_url_.GetOrigin().spec()); java_object_.Reset(Java_AutofillDialogControllerAndroid_create( env, - reinterpret_cast<jint>(this), + reinterpret_cast<intptr_t>(this), WindowAndroidHelper::FromWebContents(contents_)-> GetWindowAndroid()->GetJavaObject().obj(), request_full_billing_address, request_shipping_address, diff --git a/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc b/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc index 12b8121..be9bcc9 100644 --- a/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc +++ b/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc @@ -30,7 +30,7 @@ void AutofillPopupViewAndroid::Show() { java_object_.Reset(Java_AutofillPopupGlue_create( env, - reinterpret_cast<jint>(this), + reinterpret_cast<intptr_t>(this), view_android->GetWindowAndroid()->GetJavaObject().obj(), view_android->GetJavaObject().obj())); diff --git a/chrome/browser/ui/android/chrome_http_auth_handler.cc b/chrome/browser/ui/android/chrome_http_auth_handler.cc index 597d8bf..300a6ea 100644 --- a/chrome/browser/ui/android/chrome_http_auth_handler.cc +++ b/chrome/browser/ui/android/chrome_http_auth_handler.cc @@ -32,7 +32,7 @@ void ChromeHttpAuthHandler::Init() { DCHECK(java_chrome_http_auth_handler_.is_null()); JNIEnv* env = AttachCurrentThread(); java_chrome_http_auth_handler_.Reset( - Java_ChromeHttpAuthHandler_create(env, reinterpret_cast<jint>(this))); + Java_ChromeHttpAuthHandler_create(env, reinterpret_cast<intptr_t>(this))); } void ChromeHttpAuthHandler::SetObserver(LoginHandler* observer) { diff --git a/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc b/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc index 82a9fc8..47b9695 100644 --- a/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc +++ b/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc @@ -46,7 +46,7 @@ bool AutoLoginInfoBarDelegateAndroid::AttachAccount( DCHECK(delegate.obj()); user_ = base::android::ConvertJavaStringToUTF8( Java_AutoLoginDelegate_initializeAccount( - env, delegate.obj(), reinterpret_cast<jint>(this), jrealm.obj(), + env, delegate.obj(), reinterpret_cast<intptr_t>(this), jrealm.obj(), jaccount.obj(), jargs.obj())); return !user_.empty(); } @@ -63,7 +63,7 @@ bool AutoLoginInfoBarDelegateAndroid::Accept() { DCHECK(delegate.obj()); Java_AutoLoginDelegate_logIn(env, delegate.obj(), - reinterpret_cast<jint>(this)); + reinterpret_cast<intptr_t>(this)); // Do not close the infobar on accept, it will be closed as part // of the log in callback. @@ -76,7 +76,7 @@ bool AutoLoginInfoBarDelegateAndroid::Cancel() { weak_java_auto_login_delegate_.get(env); DCHECK(delegate.obj()); Java_AutoLoginDelegate_cancelLogIn(env, delegate.obj(), - reinterpret_cast<jint>(this)); + reinterpret_cast<intptr_t>(this)); return true; } diff --git a/chrome/browser/ui/android/infobars/confirm_infobar.cc b/chrome/browser/ui/android/infobars/confirm_infobar.cc index a4919e5..702f990 100644 --- a/chrome/browser/ui/android/infobars/confirm_infobar.cc +++ b/chrome/browser/ui/android/infobars/confirm_infobar.cc @@ -48,7 +48,7 @@ base::android::ScopedJavaLocalRef<jobject> ConfirmInfoBar::CreateRenderInfoBar( env, delegate_->GetLinkText()); return Java_ConfirmInfoBarDelegate_showConfirmInfoBar( - env, java_confirm_delegate_.obj(), reinterpret_cast<jint>(this), + env, java_confirm_delegate_.obj(), reinterpret_cast<intptr_t>(this), GetEnumeratedIconId(), message_text.obj(), link_text.obj(), ok_button_text.obj(), cancel_button_text.obj()); } diff --git a/chrome/browser/ui/android/infobars/infobar_container_android.cc b/chrome/browser/ui/android/infobars/infobar_container_android.cc index 42592b9..be77ac8 100644 --- a/chrome/browser/ui/android/infobars/infobar_container_android.cc +++ b/chrome/browser/ui/android/infobars/infobar_container_android.cc @@ -87,15 +87,15 @@ void InfoBarContainerAndroid::PlatformSpecificRemoveInfoBar(InfoBar* infobar) { // Native JNI methods --------------------------------------------------------- -static int Init(JNIEnv* env, - jobject obj, - jint native_web_contents, - jobject auto_login_delegate) { +static jlong Init(JNIEnv* env, + jobject obj, + jlong native_web_contents, + jobject auto_login_delegate) { InfoBarContainerAndroid* infobar_container = new InfoBarContainerAndroid(env, obj, auto_login_delegate); infobar_container->ChangeInfoBarService(InfoBarService::FromWebContents( reinterpret_cast<content::WebContents*>(native_web_contents))); - return reinterpret_cast<int>(infobar_container); + return reinterpret_cast<intptr_t>(infobar_container); } bool RegisterInfoBarContainer(JNIEnv* env) { diff --git a/chrome/browser/ui/android/infobars/translate_infobar.cc b/chrome/browser/ui/android/infobars/translate_infobar.cc index a14da81..868cd3d 100644 --- a/chrome/browser/ui/android/infobars/translate_infobar.cc +++ b/chrome/browser/ui/android/infobars/translate_infobar.cc @@ -44,7 +44,7 @@ ScopedJavaLocalRef<jobject> TranslateInfoBar::CreateRenderInfoBar(JNIEnv* env) { return Java_TranslateInfoBarDelegate_showTranslateInfoBar( env, java_translate_delegate_.obj(), - reinterpret_cast<jint>(this), + reinterpret_cast<intptr_t>(this), delegate_->infobar_type(), delegate_->original_language_index(), delegate_->target_language_index(), @@ -109,7 +109,7 @@ void TranslateInfoBar::TransferOwnership( JNIEnv* env = base::android::AttachCurrentThread(); if (Java_TranslateInfoBarDelegate_changeTranslateInfoBarTypeAndPointer( env, java_translate_delegate_.obj(), - reinterpret_cast<jint>(destination), new_type)) { + reinterpret_cast<intptr_t>(destination), new_type)) { ReassignJavaInfoBar(destination); destination->SetJavaDelegate(java_translate_delegate_.Release()); } diff --git a/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc b/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc index 021f823..2e15b99 100644 --- a/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc +++ b/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc @@ -98,7 +98,7 @@ void JavascriptAppModalDialogAndroid::ShowAppModalDialog() { Java_JavascriptAppModalDialog_showJavascriptAppModalDialog(env, dialog_object.obj(), parent_jobj.obj(), - reinterpret_cast<jint>(this)); + reinterpret_cast<intptr_t>(this)); } void JavascriptAppModalDialogAndroid::ActivateAppModalDialog() { diff --git a/chrome/browser/ui/android/navigation_popup.cc b/chrome/browser/ui/android/navigation_popup.cc index fca009d..dd9dffd 100644 --- a/chrome/browser/ui/android/navigation_popup.cc +++ b/chrome/browser/ui/android/navigation_popup.cc @@ -86,9 +86,9 @@ static jstring GetHistoryUrl(JNIEnv* env, jclass clazz) { return ConvertUTF8ToJavaString(env, chrome::kChromeUIHistoryURL).Release(); } -static jint Init(JNIEnv* env, jobject obj) { +static jlong Init(JNIEnv* env, jobject obj) { NavigationPopup* popup = new NavigationPopup(env, obj); - return reinterpret_cast<jint>(popup); + return reinterpret_cast<intptr_t>(popup); } // static diff --git a/chrome/browser/ui/android/website_settings_popup_android.cc b/chrome/browser/ui/android/website_settings_popup_android.cc index 4d196b3..8eebb5b 100644 --- a/chrome/browser/ui/android/website_settings_popup_android.cc +++ b/chrome/browser/ui/android/website_settings_popup_android.cc @@ -85,7 +85,7 @@ WebsiteSettingsPopupAndroid::WebsiteSettingsPopupAndroid( popup_jobject_.Reset( Java_WebsiteSettingsPopup_create(env, context, java_content_view, - reinterpret_cast<jint>(this))); + reinterpret_cast<intptr_t>(this))); presenter_.reset(new WebsiteSettings( this, |