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/history_view.h" | 5 #include "chrome/browser/history_view.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/time_format.h" | 8 #include "base/time_format.h" |
9 #include "base/word_iterator.h" | 9 #include "base/word_iterator.h" |
10 #include "chrome/browser/browsing_data_remover.h" | 10 #include "chrome/browser/browsing_data_remover.h" |
11 #include "chrome/browser/drag_utils.h" | 11 #include "chrome/browser/drag_utils.h" |
12 #include "chrome/browser/native_ui_contents.h" | 12 #include "chrome/browser/native_ui_contents.h" |
13 #include "chrome/browser/page_navigator.h" | 13 #include "chrome/browser/page_navigator.h" |
14 #include "chrome/browser/user_metrics.h" | 14 #include "chrome/browser/user_metrics.h" |
15 #include "chrome/browser/views/bookmark_bubble_view.h" | 15 #include "chrome/browser/views/bookmark_bubble_view.h" |
16 #include "chrome/browser/views/event_utils.h" | 16 #include "chrome/browser/views/event_utils.h" |
17 #include "chrome/browser/views/star_toggle.h" | 17 #include "chrome/browser/views/star_toggle.h" |
18 #include "chrome/common/drag_drop_types.h" | 18 #include "chrome/common/drag_drop_types.h" |
19 #include "chrome/common/gfx/chrome_canvas.h" | 19 #include "chrome/common/gfx/chrome_canvas.h" |
20 #include "chrome/common/gfx/favicon_size.h" | 20 #include "chrome/common/gfx/favicon_size.h" |
21 #include "chrome/common/l10n_util.h" | 21 #include "chrome/common/l10n_util.h" |
22 #include "chrome/common/resource_bundle.h" | 22 #include "chrome/common/resource_bundle.h" |
23 #include "chrome/common/time_format.h" | 23 #include "chrome/common/time_format.h" |
24 #include "chrome/common/win_util.h" | 24 #include "chrome/common/win_util.h" |
25 #include "chrome/views/container.h" | 25 #include "chrome/views/container.h" |
26 #include "chrome/views/link.h" | 26 #include "chrome/views/link.h" |
27 | 27 |
28 #include "generated_resources.h" | 28 #include "generated_resources.h" |
29 | 29 |
| 30 using base::Time; |
| 31 using base::TimeDelta; |
| 32 |
30 // The extra-wide space between groups of entries for each new day. | 33 // The extra-wide space between groups of entries for each new day. |
31 static const int kDayHeadingHeight = 50; | 34 static const int kDayHeadingHeight = 50; |
32 | 35 |
33 // The space between groups of entries within a day. | 36 // The space between groups of entries within a day. |
34 static const int kSessionBreakHeight = 24; | 37 static const int kSessionBreakHeight = 24; |
35 | 38 |
36 // Amount of time between page-views that triggers a break (in microseconds). | 39 // Amount of time between page-views that triggers a break (in microseconds). |
37 static const int64 kSessionBreakTime = 1800 * 1000000; // 30 minutes | 40 static const int64 kSessionBreakTime = 1800 * 1000000; // 30 minutes |
38 | 41 |
39 // Horizontal space between the left edge of the entries and the | 42 // Horizontal space between the left edge of the entries and the |
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 // NOTE: the height here is too big, it should be just big enough to show | 1305 // NOTE: the height here is too big, it should be just big enough to show |
1303 // the link. Additionally this should be baseline aligned with the date. I'm | 1306 // the link. Additionally this should be baseline aligned with the date. I'm |
1304 // not doing that now as a redesign of HistoryView is in the works. | 1307 // not doing that now as a redesign of HistoryView is in the works. |
1305 const int delete_width = GetDeleteControlWidth(); | 1308 const int delete_width = GetDeleteControlWidth(); |
1306 const int delete_x = width() - kRightMargin - delete_width; | 1309 const int delete_x = width() - kRightMargin - delete_width; |
1307 return gfx::Rect(delete_x, | 1310 return gfx::Rect(delete_x, |
1308 base_y + kDeleteControlOffset, | 1311 base_y + kDeleteControlOffset, |
1309 delete_width, | 1312 delete_width, |
1310 kBrowseResultsHeight); | 1313 kBrowseResultsHeight); |
1311 } | 1314 } |
1312 | |
OLD | NEW |