OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ |
6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "chrome/browser/ui/android/infobars/infobar_android.h" | 10 #include "chrome/browser/ui/android/infobars/infobar_android.h" |
11 | 11 |
12 class ConfirmInfoBarDelegate; | |
13 | |
14 namespace gfx { | |
15 class Image; | |
16 } | |
17 | |
18 // Implementation of InfoBar for confirm infobars, this currently | |
19 // includes, geolocation, popups.. | |
20 class ConfirmInfoBar : public InfoBarAndroid { | 12 class ConfirmInfoBar : public InfoBarAndroid { |
21 public: | 13 public: |
22 ConfirmInfoBar(InfoBarService* owner, InfoBarDelegate* delegate); | 14 ConfirmInfoBar(InfoBarService* owner, InfoBarDelegate* delegate); |
23 virtual ~ConfirmInfoBar(); | 15 virtual ~ConfirmInfoBar(); |
24 | 16 |
25 private: | 17 private: |
26 // InfoBar overrides. | 18 // InfoBarAndroid: |
27 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | 19 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
28 JNIEnv* env) OVERRIDE; | 20 JNIEnv* env) OVERRIDE; |
29 virtual void ProcessButton(int action, | 21 virtual void ProcessButton(int action, |
30 const std::string& action_value) OVERRIDE; | 22 const std::string& action_value) OVERRIDE; |
31 | 23 |
32 string16 GetTextFor(ActionType action); | 24 string16 GetTextFor(ConfirmInfoBarDelegate::InfoBarButton button); |
33 string16 GetMessage(); | |
34 | 25 |
35 ConfirmInfoBarDelegate* delegate_; | 26 ConfirmInfoBarDelegate* delegate_; |
36 base::android::ScopedJavaGlobalRef<jobject> java_confirm_delegate_; | 27 base::android::ScopedJavaGlobalRef<jobject> java_confirm_delegate_; |
37 | 28 |
38 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBar); | 29 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBar); |
39 }; | 30 }; |
40 | 31 |
41 // Registers native methods | 32 // Registers native methods. |
42 bool RegisterConfirmInfoBarDelegate(JNIEnv* env); | 33 bool RegisterConfirmInfoBarDelegate(JNIEnv* env); |
43 | 34 |
44 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ | 35 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ |
OLD | NEW |