| 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 #ifndef CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_VIEW_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 public gfx::AnimationDelegate, | 43 public gfx::AnimationDelegate, |
| 44 public DownloadShelf, | 44 public DownloadShelf, |
| 45 public views::VectorIconButtonDelegate, | 45 public views::VectorIconButtonDelegate, |
| 46 public views::LinkListener, | 46 public views::LinkListener, |
| 47 public views::MouseWatcherListener { | 47 public views::MouseWatcherListener { |
| 48 public: | 48 public: |
| 49 DownloadShelfView(Browser* browser, BrowserView* parent); | 49 DownloadShelfView(Browser* browser, BrowserView* parent); |
| 50 ~DownloadShelfView() override; | 50 ~DownloadShelfView() override; |
| 51 | 51 |
| 52 // Sent from the DownloadItemView when the user opens an item. | 52 // Sent from the DownloadItemView when the user opens an item. |
| 53 void OpenedDownload(); | 53 void OnDownloadOpened(); |
| 54 |
| 55 // Sent from the DownloadItemView when the user shows an item in shell. |
| 56 void OnDownloadShown(); |
| 54 | 57 |
| 55 // Returns the relevant containing object that can load pages. | 58 // Returns the relevant containing object that can load pages. |
| 56 // i.e. the |browser_|. | 59 // i.e. the |browser_|. |
| 57 content::PageNavigator* GetNavigator(); | 60 content::PageNavigator* GetNavigator(); |
| 58 | 61 |
| 59 // Returns the parent_. | 62 // Returns the parent_. |
| 60 BrowserView* get_parent() { return parent_; } | 63 BrowserView* get_parent() { return parent_; } |
| 61 | 64 |
| 62 // Implementation of View. | 65 // Implementation of View. |
| 63 gfx::Size GetPreferredSize() const override; | 66 gfx::Size GetPreferredSize() const override; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // Overridden from views::View. | 124 // Overridden from views::View. |
| 122 void OnThemeChanged() override; | 125 void OnThemeChanged() override; |
| 123 | 126 |
| 124 // Called when the "close shelf" animation ended. | 127 // Called when the "close shelf" animation ended. |
| 125 void Closed(); | 128 void Closed(); |
| 126 | 129 |
| 127 // Returns true if we can auto close. We can auto-close if all the items on | 130 // Returns true if we can auto close. We can auto-close if all the items on |
| 128 // the shelf have been opened. | 131 // the shelf have been opened. |
| 129 bool CanAutoClose(); | 132 bool CanAutoClose(); |
| 130 | 133 |
| 134 // Starts mouse watcher if we can auto close. |
| 135 void TriggerAutoClose(); |
| 136 |
| 131 // Returns the color of text for the shelf (used for deriving icon color). | 137 // Returns the color of text for the shelf (used for deriving icon color). |
| 132 SkColor GetTextColorForIconMd(); | 138 SkColor GetTextColorForIconMd(); |
| 133 | 139 |
| 134 // The browser for this shelf. | 140 // The browser for this shelf. |
| 135 Browser* browser_; | 141 Browser* browser_; |
| 136 | 142 |
| 137 // The animation for adding new items to the shelf. | 143 // The animation for adding new items to the shelf. |
| 138 gfx::SlideAnimation new_item_animation_; | 144 gfx::SlideAnimation new_item_animation_; |
| 139 | 145 |
| 140 // The show/hide animation for the shelf itself. | 146 // The show/hide animation for the shelf itself. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 153 | 159 |
| 154 // The window this shelf belongs to. | 160 // The window this shelf belongs to. |
| 155 BrowserView* parent_; | 161 BrowserView* parent_; |
| 156 | 162 |
| 157 views::MouseWatcher mouse_watcher_; | 163 views::MouseWatcher mouse_watcher_; |
| 158 | 164 |
| 159 DISALLOW_COPY_AND_ASSIGN(DownloadShelfView); | 165 DISALLOW_COPY_AND_ASSIGN(DownloadShelfView); |
| 160 }; | 166 }; |
| 161 | 167 |
| 162 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_VIEW_H_ | 168 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_VIEW_H_ |
| OLD | NEW |