OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/download/download_request_infobar_delegate.h" | 5 #include "chrome/browser/download/download_request_infobar_delegate.h" |
6 | 6 |
7 #include "grit/generated_resources.h" | 7 #include "grit/generated_resources.h" |
8 #include "grit/theme_resources_standard.h" | 8 #include "grit/theme_resources.h" |
9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
11 | 11 |
12 DownloadRequestInfoBarDelegate::DownloadRequestInfoBarDelegate( | 12 DownloadRequestInfoBarDelegate::DownloadRequestInfoBarDelegate( |
13 InfoBarTabHelper* infobar_helper, | 13 InfoBarTabHelper* infobar_helper, |
14 DownloadRequestLimiter::TabDownloadState* host) | 14 DownloadRequestLimiter::TabDownloadState* host) |
15 : ConfirmInfoBarDelegate(infobar_helper), | 15 : ConfirmInfoBarDelegate(infobar_helper), |
16 host_(host) { | 16 host_(host) { |
17 } | 17 } |
18 | 18 |
(...skipping 18 matching lines...) Expand all Loading... |
37 } | 37 } |
38 | 38 |
39 bool DownloadRequestInfoBarDelegate::Accept() { | 39 bool DownloadRequestInfoBarDelegate::Accept() { |
40 if (host_) { | 40 if (host_) { |
41 // Accept() call will nullify host_ if no further prompts are required. | 41 // Accept() call will nullify host_ if no further prompts are required. |
42 host_->Accept(); | 42 host_->Accept(); |
43 } | 43 } |
44 | 44 |
45 return !host_; | 45 return !host_; |
46 } | 46 } |
OLD | NEW |