| 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" |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 } | 578 } |
| 579 | 579 |
| 580 void HistoryItemRenderer::LinkActivated(views::Link* link, | 580 void HistoryItemRenderer::LinkActivated(views::Link* link, |
| 581 int event_flags) { | 581 int event_flags) { |
| 582 if (link == title_link_) { | 582 if (link == title_link_) { |
| 583 const GURL& url = model_->GetURL(model_index_); | 583 const GURL& url = model_->GetURL(model_index_); |
| 584 PageNavigator* navigator = parent_->navigator(); | 584 PageNavigator* navigator = parent_->navigator(); |
| 585 if (navigator && !url.is_empty()) { | 585 if (navigator && !url.is_empty()) { |
| 586 UserMetrics::RecordAction(L"Destination_History_OpenURL", | 586 UserMetrics::RecordAction(L"Destination_History_OpenURL", |
| 587 model_->profile()); | 587 model_->profile()); |
| 588 navigator->OpenURL(url, | 588 navigator->OpenURL(url, GURL(), |
| 589 event_utils::DispositionFromEventFlags(event_flags), | 589 event_utils::DispositionFromEventFlags(event_flags), |
| 590 PageTransition::AUTO_BOOKMARK); | 590 PageTransition::AUTO_BOOKMARK); |
| 591 // WARNING: call to OpenURL likely deleted us. | 591 // WARNING: call to OpenURL likely deleted us. |
| 592 return; | 592 return; |
| 593 } | 593 } |
| 594 } | 594 } |
| 595 } | 595 } |
| 596 | 596 |
| 597 HistoryItemRenderer::DragRegion HistoryItemRenderer::GetDragRegion(int x, | 597 HistoryItemRenderer::DragRegion HistoryItemRenderer::GetDragRegion(int x, |
| 598 int y) { | 598 int y) { |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 // the link. Additionally this should be baseline aligned with the date. I'm | 1303 // 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. | 1304 // not doing that now as a redesign of HistoryView is in the works. |
| 1305 const int delete_width = GetDeleteControlWidth(); | 1305 const int delete_width = GetDeleteControlWidth(); |
| 1306 const int delete_x = width() - kRightMargin - delete_width; | 1306 const int delete_x = width() - kRightMargin - delete_width; |
| 1307 return gfx::Rect(delete_x, | 1307 return gfx::Rect(delete_x, |
| 1308 base_y + kDeleteControlOffset, | 1308 base_y + kDeleteControlOffset, |
| 1309 delete_width, | 1309 delete_width, |
| 1310 kBrowseResultsHeight); | 1310 kBrowseResultsHeight); |
| 1311 } | 1311 } |
| 1312 | 1312 |
| OLD | NEW |