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

Side by Side Diff: chrome/browser/views/download_item_view.h

Issue 213018: Fix a crash canceling a completed, auto-opened download (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/views/download_item_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 20 matching lines...) Expand all
31 #include "views/controls/button/button.h" 31 #include "views/controls/button/button.h"
32 #include "views/view.h" 32 #include "views/view.h"
33 33
34 namespace views { 34 namespace views {
35 class Label; 35 class Label;
36 class NativeButton; 36 class NativeButton;
37 } 37 }
38 class BaseDownloadItemModel; 38 class BaseDownloadItemModel;
39 class DownloadShelfView; 39 class DownloadShelfView;
40 class SkBitmap; 40 class SkBitmap;
41 class DownloadShelfContextMenuWin;
41 42
42 class DownloadItemView : public views::ButtonListener, 43 class DownloadItemView : public views::ButtonListener,
43 public views::View, 44 public views::View,
44 public DownloadItem::Observer, 45 public DownloadItem::Observer,
45 public AnimationDelegate { 46 public AnimationDelegate {
46 public: 47 public:
47 DownloadItemView(DownloadItem* download, 48 DownloadItemView(DownloadItem* download,
48 DownloadShelfView* parent, 49 DownloadShelfView* parent,
49 BaseDownloadItemModel* model); 50 BaseDownloadItemModel* model);
50 virtual ~DownloadItemView(); 51 virtual ~DownloadItemView();
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // Whether we are currently disabled as part of opening the downloaded file. 238 // Whether we are currently disabled as part of opening the downloaded file.
238 bool disabled_while_opening_; 239 bool disabled_while_opening_;
239 240
240 // The time at which this view was created. 241 // The time at which this view was created.
241 base::Time creation_time_; 242 base::Time creation_time_;
242 243
243 // Method factory used to delay reenabling of the item when opening the 244 // Method factory used to delay reenabling of the item when opening the
244 // downloaded file. 245 // downloaded file.
245 ScopedRunnableMethodFactory<DownloadItemView> reenable_method_factory_; 246 ScopedRunnableMethodFactory<DownloadItemView> reenable_method_factory_;
246 247
248 // The currently running download context menu.
249 DownloadShelfContextMenuWin* active_menu_;
250
247 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); 251 DISALLOW_COPY_AND_ASSIGN(DownloadItemView);
248 }; 252 };
249 253
250 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_ITEM_VIEW_H__ 254 #endif // CHROME_BROWSER_VIEWS_DOWNLOAD_ITEM_VIEW_H__
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/download_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698