OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A ChromeView that implements one download on the Download shelf. | 5 // A ChromeView that implements one download on the Download shelf. |
6 // Each DownloadItemView contains an application icon, a text label | 6 // Each DownloadItemView contains an application icon, a text label |
7 // indicating the download's file name, a text label indicating the | 7 // indicating the download's file name, a text label indicating the |
8 // download's status (such as the number of bytes downloaded so far) | 8 // download's status (such as the number of bytes downloaded so far) |
9 // and a button for canceling an in progress download, or opening | 9 // and a button for canceling an in progress download, or opening |
10 // the completed download. | 10 // the completed download. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 virtual bool GetTooltipText(const gfx::Point& p, | 95 virtual bool GetTooltipText(const gfx::Point& p, |
96 string16* tooltip) const OVERRIDE; | 96 string16* tooltip) const OVERRIDE; |
97 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 97 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
98 | 98 |
99 // Overridden from views::ContextMenuController. | 99 // Overridden from views::ContextMenuController. |
100 virtual void ShowContextMenuForView(View* source, | 100 virtual void ShowContextMenuForView(View* source, |
101 const gfx::Point& point) OVERRIDE; | 101 const gfx::Point& point) OVERRIDE; |
102 | 102 |
103 // ButtonListener implementation. | 103 // ButtonListener implementation. |
104 virtual void ButtonPressed(views::Button* sender, | 104 virtual void ButtonPressed(views::Button* sender, |
105 const views::Event& event) OVERRIDE; | 105 const ui::Event& event) OVERRIDE; |
106 | 106 |
107 // ui::AnimationDelegate implementation. | 107 // ui::AnimationDelegate implementation. |
108 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 108 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
109 | 109 |
110 protected: | 110 protected: |
111 // Overridden from views::View: | 111 // Overridden from views::View: |
112 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 112 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
113 | 113 |
114 private: | 114 private: |
115 enum State { | 115 enum State { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 320 |
321 // The icon loaded in the download shelf is based on the file path of the | 321 // The icon loaded in the download shelf is based on the file path of the |
322 // item. Store the path used, so that we can detect a change in the path | 322 // item. Store the path used, so that we can detect a change in the path |
323 // and reload the icon. | 323 // and reload the icon. |
324 FilePath last_download_item_path_; | 324 FilePath last_download_item_path_; |
325 | 325 |
326 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); | 326 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); |
327 }; | 327 }; |
328 | 328 |
329 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ | 329 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ |
OLD | NEW |