Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: chrome/browser/ui/views/download/download_shelf_view.h

Issue 11673004: No need to pass DownloadItemModel ownership. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DownloadShelfContextMenu class cleanup and require GetMenuModel() to return non-NULL Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "chrome/browser/download/download_shelf.h" 12 #include "chrome/browser/download/download_shelf.h"
13 #include "ui/base/animation/animation_delegate.h" 13 #include "ui/base/animation/animation_delegate.h"
14 #include "ui/views/accessible_pane_view.h" 14 #include "ui/views/accessible_pane_view.h"
15 #include "ui/views/controls/button/button.h" 15 #include "ui/views/controls/button/button.h"
16 #include "ui/views/controls/link_listener.h" 16 #include "ui/views/controls/link_listener.h"
17 #include "ui/views/mouse_watcher.h" 17 #include "ui/views/mouse_watcher.h"
18 18
19 class Browser; 19 class Browser;
20 class BrowserView; 20 class BrowserView;
21 class DownloadItemView; 21 class DownloadItemView;
22 class DownloadItemModel;
23 22
24 namespace content { 23 namespace content {
24 class DownloadItem;
25 class PageNavigator; 25 class PageNavigator;
26 } 26 }
27 27
28 namespace ui { 28 namespace ui {
29 class SlideAnimation; 29 class SlideAnimation;
30 } 30 }
31 31
32 namespace views { 32 namespace views {
33 class ImageButton; 33 class ImageButton;
34 class ImageView; 34 class ImageView;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 View* focused_now) OVERRIDE; 91 View* focused_now) OVERRIDE;
92 virtual void OnDidChangeFocus(View* focused_before, 92 virtual void OnDidChangeFocus(View* focused_before,
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(DownloadItemModel* download_model) 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() 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.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 // Whether we are auto-closing. 169 // Whether we are auto-closing.
170 bool auto_closed_; 170 bool auto_closed_;
171 171
172 views::MouseWatcher mouse_watcher_; 172 views::MouseWatcher mouse_watcher_;
173 173
174 DISALLOW_COPY_AND_ASSIGN(DownloadShelfView); 174 DISALLOW_COPY_AND_ASSIGN(DownloadShelfView);
175 }; 175 };
176 176
177 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_VIEW_H_ 177 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_SHELF_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698