This source file includes following definitions.
- createInfoBar
- createInfoBar
- createWarningInfoBar
- createWarningInfoBar
- getMessageText
- onCloseButtonClicked
package org.chromium.chrome.browser.infobar;
import android.content.Context;
import org.chromium.chrome.R;
public class MessageInfoBar extends InfoBar {
private final CharSequence mTitle;
public static MessageInfoBar createInfoBar(CharSequence title) {
return new MessageInfoBar(null, 0, title, BACKGROUND_TYPE_INFO);
}
public static MessageInfoBar createInfoBar(int iconResourceId, CharSequence title) {
return new MessageInfoBar(null, iconResourceId, title, BACKGROUND_TYPE_INFO);
}
public static MessageInfoBar createWarningInfoBar(CharSequence title) {
return createWarningInfoBar(null, title);
}
public static MessageInfoBar createWarningInfoBar(InfoBarListeners.Dismiss listener,
CharSequence title) {
return new MessageInfoBar(listener, R.drawable.warning, title, BACKGROUND_TYPE_WARNING);
}
protected MessageInfoBar(InfoBarListeners.Dismiss listener, int iconResourceId,
CharSequence title, int backgroundType) {
super(listener, backgroundType, iconResourceId);
mTitle = title;
}
@Override
public CharSequence getMessageText(Context context) {
return mTitle;
}
@Override
public void onCloseButtonClicked() {
super.dismissJavaOnlyInfoBar();
}
}