| 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_GTK_DOWNLOAD_DOWNLOAD_SHELF_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_DOWNLOAD_DOWNLOAD_SHELF_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_DOWNLOAD_DOWNLOAD_SHELF_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_DOWNLOAD_DOWNLOAD_SHELF_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 int GetHeight() const; | 63 int GetHeight() const; |
| 64 | 64 |
| 65 // MessageLoop::Observer implementation: | 65 // MessageLoop::Observer implementation: |
| 66 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE; | 66 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE; |
| 67 virtual void DidProcessEvent(GdkEvent* event) OVERRIDE; | 67 virtual void DidProcessEvent(GdkEvent* event) OVERRIDE; |
| 68 | 68 |
| 69 protected: | 69 protected: |
| 70 // DownloadShelf implementation. | 70 // DownloadShelf implementation. |
| 71 virtual void DoAddDownload(content::DownloadItem* download) OVERRIDE; | 71 virtual void DoAddDownload(content::DownloadItem* download) OVERRIDE; |
| 72 virtual void DoShow() OVERRIDE; | 72 virtual void DoShow() OVERRIDE; |
| 73 virtual void DoClose() OVERRIDE; | 73 virtual void DoClose(CloseReason reason) OVERRIDE; |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 // Remove |download_item| from the download shelf and delete it. | 76 // Remove |download_item| from the download shelf and delete it. |
| 77 void RemoveDownloadItem(DownloadItemGtk* download_item); | 77 void RemoveDownloadItem(DownloadItemGtk* download_item); |
| 78 | 78 |
| 79 // Get the hbox download items ought to pack themselves into. | 79 // Get the hbox download items ought to pack themselves into. |
| 80 GtkWidget* GetHBox() const; | 80 GtkWidget* GetHBox() const; |
| 81 | 81 |
| 82 // Show more hidden download items if there is enough space in the shelf. | 82 // Show more hidden download items if there is enough space in the shelf. |
| 83 // It's called when a download item is removed from the shelf or an item's | 83 // It's called when a download item is removed from the shelf or an item's |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // True if the mouse is within the shelf's bounds, as of the last mouse event | 151 // True if the mouse is within the shelf's bounds, as of the last mouse event |
| 152 // we received. | 152 // we received. |
| 153 bool mouse_in_shelf_; | 153 bool mouse_in_shelf_; |
| 154 | 154 |
| 155 base::WeakPtrFactory<DownloadShelfGtk> weak_factory_; | 155 base::WeakPtrFactory<DownloadShelfGtk> weak_factory_; |
| 156 | 156 |
| 157 friend class DownloadItemGtk; | 157 friend class DownloadItemGtk; |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 #endif // CHROME_BROWSER_UI_GTK_DOWNLOAD_DOWNLOAD_SHELF_GTK_H_ | 160 #endif // CHROME_BROWSER_UI_GTK_DOWNLOAD_DOWNLOAD_SHELF_GTK_H_ |
| OLD | NEW |