| 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/ui/views/download/download_in_progress_dialog_view.h" | 5 #include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/browser/download/download_service.h" | 11 #include "chrome/browser/download/download_service.h" |
| 12 #include "chrome/browser/download/download_service_factory.h" | 12 #include "chrome/browser/download/download_service_factory.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "content/browser/download/download_manager.h" | 15 #include "content/browser/download/download_manager.h" |
| 16 #include "grit/chromium_strings.h" | 16 #include "grit/chromium_strings.h" |
| 17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
| 18 #include "grit/locale_settings.h" | 18 #include "grit/locale_settings.h" |
| 19 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
| 20 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
| 21 #include "ui/gfx/size.h" | 21 #include "ui/gfx/size.h" |
| 22 #include "ui/views/layout/grid_layout.h" |
| 22 #include "views/border.h" | 23 #include "views/border.h" |
| 23 #include "views/controls/label.h" | 24 #include "views/controls/label.h" |
| 24 #include "views/layout/grid_layout.h" | |
| 25 #include "views/widget/widget.h" | 25 #include "views/widget/widget.h" |
| 26 | 26 |
| 27 DownloadInProgressDialogView::DownloadInProgressDialogView(Browser* browser) | 27 DownloadInProgressDialogView::DownloadInProgressDialogView(Browser* browser) |
| 28 : browser_(browser), | 28 : browser_(browser), |
| 29 product_name_(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)) { | 29 product_name_(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)) { |
| 30 int download_count; | 30 int download_count; |
| 31 Browser::DownloadClosePreventionType type = | 31 Browser::DownloadClosePreventionType type = |
| 32 browser_->OkToCloseWithInProgressDownloads(&download_count); | 32 browser_->OkToCloseWithInProgressDownloads(&download_count); |
| 33 | 33 |
| 34 // This dialog should have been created within the same thread invocation | 34 // This dialog should have been created within the same thread invocation |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 return true; | 136 return true; |
| 137 } | 137 } |
| 138 | 138 |
| 139 string16 DownloadInProgressDialogView::GetWindowTitle() const { | 139 string16 DownloadInProgressDialogView::GetWindowTitle() const { |
| 140 return product_name_; | 140 return product_name_; |
| 141 } | 141 } |
| 142 | 142 |
| 143 views::View* DownloadInProgressDialogView::GetContentsView() { | 143 views::View* DownloadInProgressDialogView::GetContentsView() { |
| 144 return this; | 144 return this; |
| 145 } | 145 } |
| OLD | NEW |