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

Unified Diff: chrome/browser/ui/android/infobars/infobar_android.h

Issue 24562006: Cleanup upstreamed Android infobar code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/infobars/infobar_android.h
===================================================================
--- chrome/browser/ui/android/infobars/infobar_android.h (revision 225273)
+++ chrome/browser/ui/android/infobars/infobar_android.h (working copy)
@@ -16,15 +16,11 @@
class InfoBarDelegate;
class InfoBarService;
-namespace gfx {
- class Image;
-}
-
class InfoBarAndroid : public InfoBar {
public:
// Make sure this set of values is aligned with the java constants defined in
- // InfoBar.java
+ // InfoBar.java!
enum ActionType {
ACTION_NONE = 0,
// Confirm infobar
@@ -38,20 +34,21 @@
InfoBarAndroid(InfoBarService* owner, InfoBarDelegate* delegate);
virtual ~InfoBarAndroid();
- // InfoBar
+ // InfoBar:
virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar(
JNIEnv* env) = 0;
void set_java_infobar(const base::android::JavaRef<jobject>& java_info_bar);
-
bool HasSetJavaInfoBar() const;
// Tells the Java-side counterpart of this InfoBar to point to the replacement
// InfoBar instead of this one.
void ReassignJavaInfoBar(InfoBarAndroid* replacement);
- void OnButtonClicked(JNIEnv* env, jobject obj,
- jint action, jstring action_value);
+ void OnButtonClicked(JNIEnv* env,
+ jobject obj,
+ jint action,
+ jstring action_value);
void OnCloseButtonClicked(JNIEnv* env, jobject obj);
void OnInfoBarClosed(JNIEnv* env, jobject obj);
@@ -62,15 +59,15 @@
// translate into a Drawable ID using the ResourceId class.
int GetEnumeratedIconId();
- // Acquire the java infobar from a different one.
- // This is used to do in place replacements.
+ // Acquire the java infobar from a different one. This is used to do in-place
+ // replacements.
virtual void PassJavaInfoBar(InfoBarAndroid* source) {}
protected:
- // Derived classes must implement this method to process the
- // corresponding action.
- virtual void ProcessButton(
- int action, const std::string& action_value) = 0;
+ // Derived classes must implement this method to process the corresponding
+ // action.
+ virtual void ProcessButton(int action,
+ const std::string& action_value) = 0;
void CloseInfoBar();
private:
@@ -81,7 +78,7 @@
DISALLOW_COPY_AND_ASSIGN(InfoBarAndroid);
};
-// Register the NativeInfoBar's native methods through jni
+// Registers the NativeInfoBar's native methods through JNI.
bool RegisterNativeInfoBar(JNIEnv* env);
#endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_ANDROID_H_
« no previous file with comments | « chrome/browser/ui/android/infobars/confirm_infobar.cc ('k') | chrome/browser/ui/android/infobars/infobar_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698