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

Side by Side Diff: chrome/browser/ui/android/chrome_http_auth_handler.cc

Issue 67573003: Android: moves chrome/ to use long for JNI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 (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 "chrome/browser/ui/android/chrome_http_auth_handler.h" 5 #include "chrome/browser/ui/android/chrome_http_auth_handler.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 14 matching lines...) Expand all
25 : observer_(NULL), 25 : observer_(NULL),
26 explanation_(explanation) { 26 explanation_(explanation) {
27 } 27 }
28 28
29 ChromeHttpAuthHandler::~ChromeHttpAuthHandler() {} 29 ChromeHttpAuthHandler::~ChromeHttpAuthHandler() {}
30 30
31 void ChromeHttpAuthHandler::Init() { 31 void ChromeHttpAuthHandler::Init() {
32 DCHECK(java_chrome_http_auth_handler_.is_null()); 32 DCHECK(java_chrome_http_auth_handler_.is_null());
33 JNIEnv* env = AttachCurrentThread(); 33 JNIEnv* env = AttachCurrentThread();
34 java_chrome_http_auth_handler_.Reset( 34 java_chrome_http_auth_handler_.Reset(
35 Java_ChromeHttpAuthHandler_create(env, reinterpret_cast<jint>(this))); 35 Java_ChromeHttpAuthHandler_create(env, reinterpret_cast<intptr_t>(this)));
36 } 36 }
37 37
38 void ChromeHttpAuthHandler::SetObserver(LoginHandler* observer) { 38 void ChromeHttpAuthHandler::SetObserver(LoginHandler* observer) {
39 observer_ = observer; 39 observer_ = observer;
40 } 40 }
41 41
42 jobject ChromeHttpAuthHandler::GetJavaObject() { 42 jobject ChromeHttpAuthHandler::GetJavaObject() {
43 return java_chrome_http_auth_handler_.obj(); 43 return java_chrome_http_auth_handler_.obj();
44 } 44 }
45 45
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 ScopedJavaLocalRef<jstring> ChromeHttpAuthHandler::GetCancelButtonText( 104 ScopedJavaLocalRef<jstring> ChromeHttpAuthHandler::GetCancelButtonText(
105 JNIEnv* env, jobject) { 105 JNIEnv* env, jobject) {
106 return ConvertUTF16ToJavaString(env, l10n_util::GetStringUTF16(IDS_CANCEL)); 106 return ConvertUTF16ToJavaString(env, l10n_util::GetStringUTF16(IDS_CANCEL));
107 } 107 }
108 108
109 // static 109 // static
110 bool ChromeHttpAuthHandler::RegisterChromeHttpAuthHandler(JNIEnv* env) { 110 bool ChromeHttpAuthHandler::RegisterChromeHttpAuthHandler(JNIEnv* env) {
111 return RegisterNativesImpl(env); 111 return RegisterNativesImpl(env);
112 } 112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698