OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/chrome_select_file_policy.h" | 5 #include "chrome/browser/ui/chrome_select_file_policy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/browser/api/infobars/simple_alert_infobar_delegate.h" |
10 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/infobars/infobar_tab_helper.h" | 12 #include "chrome/browser/infobars/infobar_tab_helper.h" |
12 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
13 #include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h" | |
14 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 14 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
18 | 18 |
19 ChromeSelectFilePolicy::ChromeSelectFilePolicy( | 19 ChromeSelectFilePolicy::ChromeSelectFilePolicy( |
20 content::WebContents* source_contents) | 20 content::WebContents* source_contents) |
21 : source_contents_(source_contents) { | 21 : source_contents_(source_contents) { |
22 } | 22 } |
23 | 23 |
(...skipping 21 matching lines...) Expand all Loading... |
45 infobar_helper->AddInfoBar(new SimpleAlertInfoBarDelegate( | 45 infobar_helper->AddInfoBar(new SimpleAlertInfoBarDelegate( |
46 infobar_helper, | 46 infobar_helper, |
47 NULL, | 47 NULL, |
48 l10n_util::GetStringUTF16(IDS_FILE_SELECTION_DIALOG_INFOBAR), | 48 l10n_util::GetStringUTF16(IDS_FILE_SELECTION_DIALOG_INFOBAR), |
49 true)); | 49 true)); |
50 } else { | 50 } else { |
51 LOG(WARNING) << "File-selection dialogs are disabled but no WebContents " | 51 LOG(WARNING) << "File-selection dialogs are disabled but no WebContents " |
52 << "is given to display the InfoBar."; | 52 << "is given to display the InfoBar."; |
53 } | 53 } |
54 } | 54 } |
OLD | NEW |