Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / android / infobars / generated_password_saved_infobar.h
blob4bf80e61c5ae3e33b2deb48237cae13748e27cdd
1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_GENERATED_PASSWORD_SAVED_INFOBAR_H_
6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_GENERATED_PASSWORD_SAVED_INFOBAR_H_
8 #include <jni.h>
10 #include <string>
12 #include "base/android/scoped_java_ref.h"
13 #include "base/macros.h"
14 #include "base/strings/string16.h"
15 #include "chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.h"
16 #include "chrome/browser/ui/android/infobars/infobar_android.h"
18 // The Android infobar that notifies that the generated password was saved.
19 class GeneratedPasswordSavedInfoBar : public InfoBarAndroid {
20 public:
21 explicit GeneratedPasswordSavedInfoBar(
22 scoped_ptr<GeneratedPasswordSavedInfoBarDelegateAndroid> delegate);
23 ~GeneratedPasswordSavedInfoBar() override;
25 private:
26 // InfoBarAndroid implementation:
27 base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar(
28 JNIEnv* env) override;
29 void OnLinkClicked(JNIEnv* env, jobject obj) override;
30 void ProcessButton(int action, const std::string& action_value) override;
32 DISALLOW_COPY_AND_ASSIGN(GeneratedPasswordSavedInfoBar);
35 // Registers native methods.
36 bool RegisterGeneratedPasswordSavedInfoBarDelegate(JNIEnv* env);
38 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_GENERATED_PASSWORD_SAVED_INFOBAR_H_