| 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..1b28c4f5d94c4a9095fbee6a7deb203b165078ee 100644
|
| --- a/chrome/browser/ui/views/download/download_item_view.h
|
| +++ b/chrome/browser/ui/views/download/download_item_view.h
|
| @@ -136,6 +136,9 @@ class DownloadItemView : public views::InkDropHostView,
|
| void OnBlur() override;
|
|
|
| private:
|
| + FRIEND_TEST_ALL_PREFIXES(DownloadItemViewDangerousDownloadLabelTest,
|
| + AdjustTextAndGetSize);
|
| +
|
| enum State { NORMAL = 0, HOT, PUSHED };
|
| class DropDownButton;
|
|
|
| @@ -197,7 +200,7 @@ class DownloadItemView : public views::InkDropHostView,
|
| // Reverts from dangerous mode to normal download mode.
|
| void ClearWarningDialog();
|
|
|
| - // Start displaying the dangerous download warning or the malicious download
|
| + // Starts displaying the dangerous download warning or the malicious download
|
| // warning.
|
| void ShowWarningDialog();
|
|
|
| @@ -214,6 +217,12 @@ class DownloadItemView : public views::InkDropHostView,
|
| // and simply returned on subsequent calls.
|
| void SizeLabelToMinWidth();
|
|
|
| + // Given a multiline |label|, decides whether it should be displayed on one
|
| + // line (if short), or broken across two lines. In the latter case,
|
| + // linebreaks near the middle of the string and sets the label's text
|
| + // accordingly. Returns the preferred size for the label.
|
| + static gfx::Size AdjustTextAndGetSize(views::Label* label);
|
| +
|
| // Reenables the item after it has been disabled when a user clicked it to
|
| // open the downloaded file.
|
| void Reenable();
|
|
|