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

Side by Side Diff: chrome/browser/cocoa/download_item_mac.h

Issue 3127008: Preliminary work on resuming downloads whose connections have expired.
Patch Set: Waiting to send download automation error message until after other downloads are canceled. Created 10 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_COCOA_DOWNLOAD_ITEM_MAC_H_ 5 #ifndef CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_MAC_H_
6 #define CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_MAC_H_ 6 #define CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
(...skipping 17 matching lines...) Expand all
28 DownloadItemMac(BaseDownloadItemModel* download_model, 28 DownloadItemMac(BaseDownloadItemModel* download_model,
29 DownloadItemController* controller); 29 DownloadItemController* controller);
30 30
31 // Destructor. 31 // Destructor.
32 ~DownloadItemMac(); 32 ~DownloadItemMac();
33 33
34 // DownloadItem::Observer implementation 34 // DownloadItem::Observer implementation
35 virtual void OnDownloadUpdated(DownloadItem* download); 35 virtual void OnDownloadUpdated(DownloadItem* download);
36 virtual void OnDownloadFileCompleted(DownloadItem* download) { } 36 virtual void OnDownloadFileCompleted(DownloadItem* download) { }
37 virtual void OnDownloadOpened(DownloadItem* download) { } 37 virtual void OnDownloadOpened(DownloadItem* download) { }
38 virtual void OnDownloadInterrupted(DownloadItem* download) { }
38 39
39 BaseDownloadItemModel* download_model() { return download_model_.get(); } 40 BaseDownloadItemModel* download_model() { return download_model_.get(); }
40 41
41 // Asynchronous icon loading support. 42 // Asynchronous icon loading support.
42 void LoadIcon(); 43 void LoadIcon();
43 44
44 private: 45 private:
45 // Callback for asynchronous icon loading. 46 // Callback for asynchronous icon loading.
46 void OnExtractIconComplete(IconManager::Handle handle, SkBitmap* icon_bitmap); 47 void OnExtractIconComplete(IconManager::Handle handle, SkBitmap* icon_bitmap);
47 48
48 // The download item model we represent. 49 // The download item model we represent.
49 scoped_ptr<BaseDownloadItemModel> download_model_; 50 scoped_ptr<BaseDownloadItemModel> download_model_;
50 51
51 // The objective-c controller object. 52 // The objective-c controller object.
52 DownloadItemController* item_controller_; // weak, owns us. 53 DownloadItemController* item_controller_; // weak, owns us.
53 54
54 // For canceling an in progress icon request. 55 // For canceling an in progress icon request.
55 CancelableRequestConsumerT<int, 0> icon_consumer_; 56 CancelableRequestConsumerT<int, 0> icon_consumer_;
56 57
57 // Stores the last known name where the file will be saved. 58 // Stores the last known name where the file will be saved.
58 FilePath lastFilePath_; 59 FilePath lastFilePath_;
59 60
60 DISALLOW_COPY_AND_ASSIGN(DownloadItemMac); 61 DISALLOW_COPY_AND_ASSIGN(DownloadItemMac);
61 }; 62 };
62 63
63 #endif // CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_MAC_H_ 64 #endif // CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698