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

Unified Diff: chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.h

Issue 208393015: Revert "Remove desktop auto-login since we don't plan on shipping it there. Refactor the base and … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.h
diff --git a/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.h b/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..d84e7fcfc2496037e062e34e6826e1159082e881
--- /dev/null
+++ b/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.h
@@ -0,0 +1,44 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTO_LOGIN_INFOBAR_DELEGATE_ANDROID_H_
+#define CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTO_LOGIN_INFOBAR_DELEGATE_ANDROID_H_
+
+#include "base/android/jni_helper.h"
+#include "base/android/scoped_java_ref.h"
+#include "chrome/browser/ui/auto_login_infobar_delegate.h"
+
+class AutoLoginInfoBarDelegateAndroid : public AutoLoginInfoBarDelegate {
+ public:
+ AutoLoginInfoBarDelegateAndroid(const Params& params, Profile* profile);
+ virtual ~AutoLoginInfoBarDelegateAndroid();
+
+ // AutoLoginInfoBarDelegate:
+ virtual bool Accept() OVERRIDE;
+ virtual bool Cancel() OVERRIDE;
+ virtual base::string16 GetMessageText() const OVERRIDE;
+
+ // These methods are defined in downstream code.
+ bool AttachAccount(JavaObjectWeakGlobalRef weak_java_translate_helper);
+ void LoginSuccess(JNIEnv* env, jobject obj, jstring result);
+ void LoginFailed(JNIEnv* env, jobject obj);
+ void LoginDismiss(JNIEnv* env, jobject obj);
+
+ // Register Android JNI bindings.
+ static bool Register(JNIEnv* env);
+
+ private:
+ const std::string& realm() const { return params_.header.realm; }
+ const std::string& account() const { return params_.header.account; }
+ const std::string& args() const { return params_.header.args; }
+
+ JavaObjectWeakGlobalRef weak_java_auto_login_delegate_;
+ std::string user_;
+ const Params params_;
+
+ DISALLOW_COPY_AND_ASSIGN(AutoLoginInfoBarDelegateAndroid);
+};
+
+#endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTO_LOGIN_INFOBAR_DELEGATE_ANDROID_H_
+

Powered by Google App Engine
This is Rietveld 408576698