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

Side by Side Diff: content/browser/download/download_item_impl.h

Issue 11941015: Move OpenItem/ShowItemInFolder from ContentBrowserClient to DownloadManagerDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: _ 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 CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 virtual bool GetAutoOpened() OVERRIDE; 145 virtual bool GetAutoOpened() OVERRIDE;
146 virtual bool GetOpened() const OVERRIDE; 146 virtual bool GetOpened() const OVERRIDE;
147 virtual BrowserContext* GetBrowserContext() const OVERRIDE; 147 virtual BrowserContext* GetBrowserContext() const OVERRIDE;
148 virtual WebContents* GetWebContents() const OVERRIDE; 148 virtual WebContents* GetWebContents() const OVERRIDE;
149 virtual void OnContentCheckCompleted(DownloadDangerType danger_type) OVERRIDE; 149 virtual void OnContentCheckCompleted(DownloadDangerType danger_type) OVERRIDE;
150 virtual void SetOpenWhenComplete(bool open) OVERRIDE; 150 virtual void SetOpenWhenComplete(bool open) OVERRIDE;
151 virtual void SetIsTemporary(bool temporary) OVERRIDE; 151 virtual void SetIsTemporary(bool temporary) OVERRIDE;
152 virtual void SetOpened(bool opened) OVERRIDE; 152 virtual void SetOpened(bool opened) OVERRIDE;
153 virtual void SetDisplayName(const FilePath& name) OVERRIDE; 153 virtual void SetDisplayName(const FilePath& name) OVERRIDE;
154 virtual std::string DebugString(bool verbose) const OVERRIDE; 154 virtual std::string DebugString(bool verbose) const OVERRIDE;
155 virtual void MockDownloadOpenForTesting() OVERRIDE;
156 155
157 // All remaining public interfaces virtual to allow for DownloadItemImpl 156 // All remaining public interfaces virtual to allow for DownloadItemImpl
158 // mocks. 157 // mocks.
159 158
160 virtual ResumeMode GetResumeMode() const; 159 virtual ResumeMode GetResumeMode() const;
161 160
162 // State transition operations on regular downloads -------------------------- 161 // State transition operations on regular downloads --------------------------
163 162
164 // Start the download. 163 // Start the download.
165 // |download_file| is the associated file on the storage medium. 164 // |download_file| is the associated file on the storage medium.
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 458
460 // True if we've saved all the data for the download. 459 // True if we've saved all the data for the download.
461 bool all_data_saved_; 460 bool all_data_saved_;
462 461
463 // Did the user open the item either directly or indirectly (such as by 462 // Did the user open the item either directly or indirectly (such as by
464 // setting always open files of this type)? The shelf also sets this field 463 // setting always open files of this type)? The shelf also sets this field
465 // when the user closes the shelf before the item has been opened but should 464 // when the user closes the shelf before the item has been opened but should
466 // be treated as though the user opened it. 465 // be treated as though the user opened it.
467 bool opened_; 466 bool opened_;
468 467
469 // Do we actually open downloads when requested? For testing purposes only.
470 bool open_enabled_;
471
472 // Did the delegate delay calling Complete on this download? 468 // Did the delegate delay calling Complete on this download?
473 bool delegate_delayed_complete_; 469 bool delegate_delayed_complete_;
474 470
475 // DownloadFile associated with this download. Note that this 471 // DownloadFile associated with this download. Note that this
476 // pointer may only be used or destroyed on the FILE thread. 472 // pointer may only be used or destroyed on the FILE thread.
477 // This pointer will be non-null only while the DownloadItem is in 473 // This pointer will be non-null only while the DownloadItem is in
478 // the IN_PROGRESS state. 474 // the IN_PROGRESS state.
479 scoped_ptr<DownloadFile> download_file_; 475 scoped_ptr<DownloadFile> download_file_;
480 476
481 // Net log to use for this download. 477 // Net log to use for this download.
482 const net::BoundNetLog bound_net_log_; 478 const net::BoundNetLog bound_net_log_;
483 479
484 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; 480 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_;
485 481
486 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); 482 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl);
487 }; 483 };
488 484
489 } // namespace content 485 } // namespace content
490 486
491 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ 487 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698