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

Side by Side Diff: chrome/browser/ui/android/infobars/confirm_infobar.h

Issue 24562006: Cleanup upstreamed Android infobar code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/infobars/confirm_infobar_delegate.h"
10 #include "chrome/browser/ui/android/infobars/infobar_android.h" 11 #include "chrome/browser/ui/android/infobars/infobar_android.h"
11 12
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 { 13 class ConfirmInfoBar : public InfoBarAndroid {
21 public: 14 public:
22 ConfirmInfoBar(InfoBarService* owner, InfoBarDelegate* delegate); 15 ConfirmInfoBar(InfoBarService* owner, InfoBarDelegate* delegate);
23 virtual ~ConfirmInfoBar(); 16 virtual ~ConfirmInfoBar();
24 17
25 private: 18 private:
26 // InfoBar overrides. 19 // InfoBarAndroid:
27 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( 20 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar(
28 JNIEnv* env) OVERRIDE; 21 JNIEnv* env) OVERRIDE;
29 virtual void ProcessButton(int action, 22 virtual void ProcessButton(int action,
30 const std::string& action_value) OVERRIDE; 23 const std::string& action_value) OVERRIDE;
31 24
32 string16 GetTextFor(ActionType action); 25 string16 GetTextFor(ConfirmInfoBarDelegate::InfoBarButton button);
33 string16 GetMessage();
34 26
35 ConfirmInfoBarDelegate* delegate_; 27 ConfirmInfoBarDelegate* delegate_;
36 base::android::ScopedJavaGlobalRef<jobject> java_confirm_delegate_; 28 base::android::ScopedJavaGlobalRef<jobject> java_confirm_delegate_;
37 29
38 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBar); 30 DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBar);
39 }; 31 };
40 32
41 // Registers native methods 33 // Registers native methods.
42 bool RegisterConfirmInfoBarDelegate(JNIEnv* env); 34 bool RegisterConfirmInfoBarDelegate(JNIEnv* env);
43 35
44 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_ 36 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698