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

Unified Diff: chrome/browser/ui/views/download/download_item_view.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/download/download_item_view.cc
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc
index a1b609801d36eaadf0b9a1762e2ffdbc1d4f9943..4db589a06c096392ab15f12a7b6bdc812f02f9a9 100644
--- a/chrome/browser/ui/views/download/download_item_view.cc
+++ b/chrome/browser/ui/views/download/download_item_view.cc
@@ -361,7 +361,7 @@ void DownloadItemView::Layout() {
}
}
-gfx::Size DownloadItemView::GetPreferredSize() {
+gfx::Size DownloadItemView::GetPreferredSize() const {
int width, height;
// First, we set the height to the height of two rows or text plus margins.
@@ -371,7 +371,7 @@ gfx::Size DownloadItemView::GetPreferredSize() {
height = std::max<int>(height, DownloadShelf::kSmallProgressIconSize);
if (IsShowingWarningDialog()) {
- BodyImageSet* body_image_set =
+ const BodyImageSet* body_image_set =
(mode_ == DANGEROUS_MODE) ? &dangerous_mode_body_image_set_ :
&malicious_mode_body_image_set_;
width = kLeftPadding + body_image_set->top_left->width();
@@ -1204,7 +1204,7 @@ void DownloadItemView::ShowWarningDialog() {
TooltipTextChanged();
}
-gfx::Size DownloadItemView::GetButtonSize() {
+gfx::Size DownloadItemView::GetButtonSize() const {
DCHECK(discard_button_ && (mode_ == MALICIOUS_MODE || save_button_));
gfx::Size size;
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view.h ('k') | chrome/browser/ui/views/download/download_shelf_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698