| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTO_LOGIN_INFOBAR_DELEGATE_ANDROID_H
_ | |
| 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTO_LOGIN_INFOBAR_DELEGATE_ANDROID_H
_ | |
| 7 | |
| 8 #include "base/android/jni_helper.h" | |
| 9 #include "base/android/scoped_java_ref.h" | |
| 10 #include "chrome/browser/ui/auto_login_infobar_delegate.h" | |
| 11 | |
| 12 class AutoLoginInfoBarDelegateAndroid : public AutoLoginInfoBarDelegate { | |
| 13 public: | |
| 14 AutoLoginInfoBarDelegateAndroid(const Params& params, Profile* profile); | |
| 15 virtual ~AutoLoginInfoBarDelegateAndroid(); | |
| 16 | |
| 17 // AutoLoginInfoBarDelegate: | |
| 18 virtual bool Accept() OVERRIDE; | |
| 19 virtual bool Cancel() OVERRIDE; | |
| 20 virtual base::string16 GetMessageText() const OVERRIDE; | |
| 21 | |
| 22 // These methods are defined in downstream code. | |
| 23 bool AttachAccount(JavaObjectWeakGlobalRef weak_java_translate_helper); | |
| 24 void LoginSuccess(JNIEnv* env, jobject obj, jstring result); | |
| 25 void LoginFailed(JNIEnv* env, jobject obj); | |
| 26 void LoginDismiss(JNIEnv* env, jobject obj); | |
| 27 | |
| 28 // Register Android JNI bindings. | |
| 29 static bool Register(JNIEnv* env); | |
| 30 | |
| 31 private: | |
| 32 const std::string& realm() const { return params_.header.realm; } | |
| 33 const std::string& account() const { return params_.header.account; } | |
| 34 const std::string& args() const { return params_.header.args; } | |
| 35 | |
| 36 JavaObjectWeakGlobalRef weak_java_auto_login_delegate_; | |
| 37 std::string user_; | |
| 38 const Params params_; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(AutoLoginInfoBarDelegateAndroid); | |
| 41 }; | |
| 42 | |
| 43 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTO_LOGIN_INFOBAR_DELEGATE_ANDROI
D_H_ | |
| 44 | |
| OLD | NEW |