summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/chrome_select_file_policy.cc
diff options
context:
space:
mode:
authordfalcantara@chromium.org <dfalcantara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-16 19:03:58 +0000
committerdfalcantara@chromium.org <dfalcantara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-16 19:03:58 +0000
commita1c8bae3608e6c40f0258fbb780223cdae0b61d5 (patch)
treece49a3456de4bbf6e963285c7357d0c8de0f1fae /chrome/browser/ui/chrome_select_file_policy.cc
parent58253ed45cf9f45828d380ceab10872e7ca2a08d (diff)
downloadchromium_src-a1c8bae3608e6c40f0258fbb780223cdae0b61d5.zip
chromium_src-a1c8bae3608e6c40f0258fbb780223cdae0b61d5.tar.gz
chromium_src-a1c8bae3608e6c40f0258fbb780223cdae0b61d5.tar.bz2
[InfoBar] Add InfoBarDelegate::GetIconID()
Splits apart the GetIcon() call to allow accessing the ID of the resource in addition to the loaded image. This is needed so that the Android port can determine which of the Java-side resources it needs to load for its UI. * GetIconID() is a function that gets overridden by subclasses instead of GetIcon(). GetIconID() returns the IDR_* tag that represents the icon that it would normally load. * GetIcon() now calls GetIconID() and shouldn't be overridden. * Small change to the SimpleAlertInfoBarDelegate::Create() call to account for invalid icon IDs (was NULL for bitmaps, 0 for non-existent icons). BUG=237034 Review URL: https://chromiumcodereview.appspot.com/15067008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/chrome_select_file_policy.cc')
-rw-r--r--chrome/browser/ui/chrome_select_file_policy.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/ui/chrome_select_file_policy.cc b/chrome/browser/ui/chrome_select_file_policy.cc
index fe0a0049..86db315 100644
--- a/chrome/browser/ui/chrome_select_file_policy.cc
+++ b/chrome/browser/ui/chrome_select_file_policy.cc
@@ -30,7 +30,8 @@ void ChromeSelectFilePolicy::SelectFileDenied() {
// Show the InfoBar saying that file-selection dialogs are disabled.
if (source_contents_) {
SimpleAlertInfoBarDelegate::Create(
- InfoBarService::FromWebContents(source_contents_), NULL,
+ InfoBarService::FromWebContents(source_contents_),
+ InfoBarDelegate::kNoIconID,
l10n_util::GetStringUTF16(IDS_FILE_SELECTION_DIALOG_INFOBAR), true);
} else {
LOG(WARNING) << "File-selection dialogs are disabled but no WebContents "