Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: chrome/browser/views/download_item_view.cc

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/app/theme/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/l10n_util.h" 16 #include "chrome/common/l10n_util.h"
17 #include "chrome/common/resource_bundle.h" 17 #include "chrome/common/resource_bundle.h"
18 #include "chrome/common/win_util.h" 18 #include "chrome/common/win_util.h"
19 #include "chrome/views/container.h" 19 #include "chrome/views/container.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"
22 22
23 #include "generated_resources.h" 23 #include "generated_resources.h"
24 24
25 using base::TimeDelta;
26
25 // TODO(paulg): These may need to be adjusted when download progress 27 // TODO(paulg): These may need to be adjusted when download progress
26 // animation is added, and also possibly to take into account 28 // animation is added, and also possibly to take into account
27 // different screen resolutions. 29 // different screen resolutions.
28 static const int kTextWidth = 140; // Pixels 30 static const int kTextWidth = 140; // Pixels
29 static const int kDangerousTextWidth = 200; // Pixels 31 static const int kDangerousTextWidth = 200; // Pixels
30 static const int kHorizontalTextPadding = 2; // Pixels 32 static const int kHorizontalTextPadding = 2; // Pixels
31 static const int kVerticalPadding = 3; // Pixels 33 static const int kVerticalPadding = 3; // Pixels
32 static const int kVerticalTextSpacer = 2; // Pixels 34 static const int kVerticalTextSpacer = 2; // Pixels
33 static const int kVerticalTextPadding = 2; // Pixels 35 static const int kVerticalTextPadding = 2; // Pixels
34 36
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 sp_index = text.find(L" ", sp_index + 1); 786 sp_index = text.find(L" ", sp_index + 1);
785 } 787 }
786 788
787 // If we have a line with no space, we won't cut it. 789 // If we have a line with no space, we won't cut it.
788 if (min_width == -1) 790 if (min_width == -1)
789 size = dangerous_download_label_->GetPreferredSize(); 791 size = dangerous_download_label_->GetPreferredSize();
790 792
791 dangerous_download_label_->SetBounds(0, 0, size.width(), size.height()); 793 dangerous_download_label_->SetBounds(0, 0, size.width(), size.height());
792 dangerous_download_label_sized_ = true; 794 dangerous_download_label_sized_ = true;
793 } 795 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698