| 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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 model_ = model; | 550 model_ = model; |
| 551 model_index_ = model_index; | 551 model_index_ = model_index; |
| 552 } | 552 } |
| 553 | 553 |
| 554 void HistoryItemRenderer::SetDisplayStyle(bool show_full) { | 554 void HistoryItemRenderer::SetDisplayStyle(bool show_full) { |
| 555 show_full_ = show_full; | 555 show_full_ = show_full; |
| 556 } | 556 } |
| 557 | 557 |
| 558 void HistoryItemRenderer::StarStateChanged(bool state) { | 558 void HistoryItemRenderer::StarStateChanged(bool state) { |
| 559 // Show the user a tip that can be used to edit the bookmark/star. | 559 // Show the user a tip that can be used to edit the bookmark/star. |
| 560 CPoint star_location(0, 0); | 560 gfx::Point star_location; |
| 561 ChromeViews::View::ConvertPointToScreen(star_toggle_, &star_location); | 561 ChromeViews::View::ConvertPointToScreen(star_toggle_, &star_location); |
| 562 // Shift the location to make the bubble appear at a visually pleasing | 562 // Shift the location to make the bubble appear at a visually pleasing |
| 563 // location. | 563 // location. |
| 564 gfx::Rect star_bounds(star_location.x, star_location.y + 4, | 564 gfx::Rect star_bounds(star_location.x(), star_location.y() + 4, |
| 565 star_toggle_->width(), | 565 star_toggle_->width(), |
| 566 star_toggle_->height()); | 566 star_toggle_->height()); |
| 567 HWND parent = GetViewContainer()->GetHWND(); | 567 HWND parent = GetViewContainer()->GetHWND(); |
| 568 Profile* profile = model_->profile(); | 568 Profile* profile = model_->profile(); |
| 569 GURL url = model_->GetURL(model_index_); | 569 GURL url = model_->GetURL(model_index_); |
| 570 | 570 |
| 571 if (state) { | 571 if (state) { |
| 572 // Only change the star state if the page is not starred. The user can | 572 // Only change the star state if the page is not starred. The user can |
| 573 // unstar by way of the bubble. | 573 // unstar by way of the bubble. |
| 574 star_toggle_->SetState(true); | 574 star_toggle_->SetState(true); |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 // the link. Additionally this should be baseline aligned with the date. I'm | 1305 // the link. Additionally this should be baseline aligned with the date. I'm |
| 1306 // not doing that now as a redesign of HistoryView is in the works. | 1306 // not doing that now as a redesign of HistoryView is in the works. |
| 1307 const int delete_width = GetDeleteControlWidth(); | 1307 const int delete_width = GetDeleteControlWidth(); |
| 1308 const int delete_x = width() - kRightMargin - delete_width; | 1308 const int delete_x = width() - kRightMargin - delete_width; |
| 1309 return gfx::Rect(delete_x, | 1309 return gfx::Rect(delete_x, |
| 1310 base_y + kDeleteControlOffset, | 1310 base_y + kDeleteControlOffset, |
| 1311 delete_width, | 1311 delete_width, |
| 1312 kBrowseResultsHeight); | 1312 kBrowseResultsHeight); |
| 1313 } | 1313 } |
| 1314 | 1314 |
| OLD | NEW |