| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 View* focused_now) OVERRIDE; | 93 View* focused_now) OVERRIDE; |
| 94 | 94 |
| 95 // Removes a specified download view. The supplied view is deleted after | 95 // Removes a specified download view. The supplied view is deleted after |
| 96 // it's removed. | 96 // it's removed. |
| 97 void RemoveDownloadView(views::View* view); | 97 void RemoveDownloadView(views::View* view); |
| 98 | 98 |
| 99 protected: | 99 protected: |
| 100 // Implementation of DownloadShelf. | 100 // Implementation of DownloadShelf. |
| 101 virtual void DoAddDownload(content::DownloadItem* download) OVERRIDE; | 101 virtual void DoAddDownload(content::DownloadItem* download) OVERRIDE; |
| 102 virtual void DoShow() OVERRIDE; | 102 virtual void DoShow() OVERRIDE; |
| 103 virtual void DoClose() OVERRIDE; | 103 virtual void DoClose(CloseReason reason) OVERRIDE; |
| 104 | 104 |
| 105 // From AccessiblePaneView | 105 // From AccessiblePaneView |
| 106 virtual views::View* GetDefaultFocusableChild() OVERRIDE; | 106 virtual views::View* GetDefaultFocusableChild() OVERRIDE; |
| 107 | 107 |
| 108 private: | 108 private: |
| 109 // Adds a View representing a download to this DownloadShelfView. | 109 // Adds a View representing a download to this DownloadShelfView. |
| 110 // DownloadShelfView takes ownership of the View, and will delete it as | 110 // DownloadShelfView takes ownership of the View, and will delete it as |
| 111 // necessary. | 111 // necessary. |
| 112 void AddDownloadView(DownloadItemView* view); | 112 void AddDownloadView(DownloadItemView* view); |
| 113 | 113 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // by View. | 159 // by View. |
| 160 views::Link* show_all_view_; | 160 views::Link* show_all_view_; |
| 161 | 161 |
| 162 // Button for closing the downloads. This is contained as a child, and | 162 // Button for closing the downloads. This is contained as a child, and |
| 163 // deleted by View. | 163 // deleted by View. |
| 164 views::ImageButton* close_button_; | 164 views::ImageButton* close_button_; |
| 165 | 165 |
| 166 // The window this shelf belongs to. | 166 // The window this shelf belongs to. |
| 167 BrowserView* parent_; | 167 BrowserView* parent_; |
| 168 | 168 |
| 169 // Whether we are auto-closing. | |
| 170 bool auto_closed_; | |
| 171 | |
| 172 views::MouseWatcher mouse_watcher_; | 169 views::MouseWatcher mouse_watcher_; |
| 173 | 170 |
| 174 DISALLOW_COPY_AND_ASSIGN(DownloadShelfView); | 171 DISALLOW_COPY_AND_ASSIGN(DownloadShelfView); |
| 175 }; | 172 }; |
| 176 | 173 |
| 177 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_VIEW_H_ | 174 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_VIEW_H_ |
| OLD | NEW |