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

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

Issue 2556573002: Fix SizeLabelToMinWidth() function such that no unnecessary space (Closed)
Patch Set: 2nd round comments Created 4 years 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.h
diff --git a/chrome/browser/ui/views/download/download_item_view.h b/chrome/browser/ui/views/download/download_item_view.h
index 1b4db80a90d7b12e584ee5b5480cd4e46dad3748..4b5f6e82d1be07a07964e23ccce5455529a8f2df 100644
--- a/chrome/browser/ui/views/download/download_item_view.h
+++ b/chrome/browser/ui/views/download/download_item_view.h
@@ -136,6 +136,8 @@ class DownloadItemView : public views::InkDropHostView,
void OnBlur() override;
private:
+ friend class DownloadItemViewTest;
+
enum State { NORMAL = 0, HOT, PUSHED };
class DropDownButton;
@@ -214,6 +216,10 @@ class DownloadItemView : public views::InkDropHostView,
// and simply returned on subsequent calls.
void SizeLabelToMinWidth();
+ // Called by SizeLabelToMinWidth() to compute the optimal size of dangerous
Peter Kasting 2016/12/08 05:10:23 Nit: of -> of the, or "of |dangerous_download_labe
Jialiu Lin 2016/12/08 07:47:40 Done.
+ // download label and set the text accordingly.
+ gfx::Size GetLabelSize();
Peter Kasting 2016/12/08 05:10:23 Nit: Seems like this should be named SetLabelTextA
Jialiu Lin 2016/12/08 07:47:40 Done.
+
// Reenables the item after it has been disabled when a user clicked it to
// open the downloaded file.
void Reenable();

Powered by Google App Engine
This is Rietveld 408576698