OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/download_item_view.h" | 5 #include "chrome/browser/views/download_item_view.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "chrome/app/theme/theme_resources.h" | 11 #include "grit/theme_resources.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/download/download_util.h" | 13 #include "chrome/browser/download/download_util.h" |
14 #include "chrome/browser/views/download_shelf_view.h" | 14 #include "chrome/browser/views/download_shelf_view.h" |
15 #include "chrome/common/gfx/chrome_canvas.h" | 15 #include "chrome/common/gfx/chrome_canvas.h" |
16 #include "chrome/common/gfx/text_elider.h" | 16 #include "chrome/common/gfx/text_elider.h" |
17 #include "chrome/common/l10n_util.h" | 17 #include "chrome/common/l10n_util.h" |
18 #include "chrome/common/resource_bundle.h" | 18 #include "chrome/common/resource_bundle.h" |
19 #include "chrome/common/win_util.h" | 19 #include "chrome/common/win_util.h" |
20 #include "chrome/views/native_button.h" | 20 #include "chrome/views/native_button.h" |
21 #include "chrome/views/root_view.h" | 21 #include "chrome/views/root_view.h" |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 sp_index = text.find(L" ", sp_index + 1); | 816 sp_index = text.find(L" ", sp_index + 1); |
817 } | 817 } |
818 | 818 |
819 // If we have a line with no space, we won't cut it. | 819 // If we have a line with no space, we won't cut it. |
820 if (min_width == -1) | 820 if (min_width == -1) |
821 size = dangerous_download_label_->GetPreferredSize(); | 821 size = dangerous_download_label_->GetPreferredSize(); |
822 | 822 |
823 dangerous_download_label_->SetBounds(0, 0, size.width(), size.height()); | 823 dangerous_download_label_->SetBounds(0, 0, size.width(), size.height()); |
824 dangerous_download_label_sized_ = true; | 824 dangerous_download_label_sized_ = true; |
825 } | 825 } |
OLD | NEW |