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.
5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_
6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_
8 #include "base/basictypes.h"
9 #include "base/strings/string16.h"
10 #include "chrome/browser/infobars/confirm_infobar_delegate.h"
11 #include "chrome/browser/ui/android/infobars/infobar_android.h"
13 class ConfirmInfoBar
: public InfoBarAndroid
{
15 explicit ConfirmInfoBar(scoped_ptr
<ConfirmInfoBarDelegate
> delegate
);
16 virtual ~ConfirmInfoBar();
20 virtual base::android::ScopedJavaLocalRef
<jobject
> CreateRenderInfoBar(
21 JNIEnv
* env
) OVERRIDE
;
22 virtual void OnLinkClicked(JNIEnv
* env
, jobject obj
) OVERRIDE
;
23 virtual void ProcessButton(int action
,
24 const std::string
& action_value
) OVERRIDE
;
26 ConfirmInfoBarDelegate
* GetDelegate();
27 base::string16
GetTextFor(ConfirmInfoBarDelegate::InfoBarButton button
);
29 base::android::ScopedJavaGlobalRef
<jobject
> java_confirm_delegate_
;
31 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBar
);
34 // Registers native methods.
35 bool RegisterConfirmInfoBarDelegate(JNIEnv
* env
);
37 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_