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

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

Issue 2105173004: Remove calls to MessageLoop::current() in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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) 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_DRAG_DOWNLOAD_FILE_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/files/file.h" 11 #include "base/files/file.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
15 #include "base/run_loop.h" 16 #include "base/run_loop.h"
17 #include "base/single_thread_task_runner.h"
16 #include "content/browser/download/download_file.h" 18 #include "content/browser/download/download_file.h"
17 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
18 #include "content/public/browser/download_item.h" 20 #include "content/public/browser/download_item.h"
19 #include "content/public/browser/download_manager.h" 21 #include "content/public/browser/download_manager.h"
20 #include "content/public/common/referrer.h" 22 #include "content/public/common/referrer.h"
21 #include "ui/base/dragdrop/download_file_interface.h" 23 #include "ui/base/dragdrop/download_file_interface.h"
22 #include "url/gurl.h" 24 #include "url/gurl.h"
23 25
24 namespace content { 26 namespace content {
25 27
(...skipping 26 matching lines...) Expand all
52 class DragDownloadFileUI; 54 class DragDownloadFileUI;
53 enum State {INITIALIZED, STARTED, SUCCESS, FAILURE}; 55 enum State {INITIALIZED, STARTED, SUCCESS, FAILURE};
54 56
55 ~DragDownloadFile() override; 57 ~DragDownloadFile() override;
56 58
57 void DownloadCompleted(bool is_successful); 59 void DownloadCompleted(bool is_successful);
58 void CheckThread(); 60 void CheckThread();
59 61
60 base::FilePath file_path_; 62 base::FilePath file_path_;
61 base::File file_; 63 base::File file_;
62 base::MessageLoop* drag_message_loop_; 64 const scoped_refptr<base::SingleThreadTaskRunner> drag_task_runner_;
63 State state_; 65 State state_;
64 scoped_refptr<ui::DownloadFileObserver> observer_; 66 scoped_refptr<ui::DownloadFileObserver> observer_;
65 base::RunLoop nested_loop_; 67 base::RunLoop nested_loop_;
66 DragDownloadFileUI* drag_ui_; 68 DragDownloadFileUI* drag_ui_;
67 base::WeakPtrFactory<DragDownloadFile> weak_ptr_factory_; 69 base::WeakPtrFactory<DragDownloadFile> weak_ptr_factory_;
68 70
69 DISALLOW_COPY_AND_ASSIGN(DragDownloadFile); 71 DISALLOW_COPY_AND_ASSIGN(DragDownloadFile);
70 }; 72 };
71 73
72 } // namespace content 74 } // namespace content
73 75
74 #endif // CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_ 76 #endif // CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_FILE_H_
OLDNEW
« no previous file with comments | « content/browser/device_sensors/data_fetcher_shared_memory_mac.cc ('k') | content/browser/download/drag_download_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698