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_
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
{
21 explicit GeneratedPasswordSavedInfoBar(
22 scoped_ptr
<GeneratedPasswordSavedInfoBarDelegateAndroid
> delegate
);
23 ~GeneratedPasswordSavedInfoBar() override
;
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_