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

Side by Side Diff: chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.h

Issue 1112573002: [chrome/browser/extensions] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed other nits Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILITY_ CLIENT_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILITY_ CLIENT_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILITY_ CLIENT_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILITY_ CLIENT_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/single_thread_task_runner.h"
10 #include "base/threading/sequenced_worker_pool.h" 11 #include "base/threading/sequenced_worker_pool.h"
11 #include "content/public/browser/utility_process_host.h" 12 #include "content/public/browser/utility_process_host.h"
12 #include "content/public/browser/utility_process_host_client.h" 13 #include "content/public/browser/utility_process_host_client.h"
13 14
14 // Writes a disk image to a device inside the utility process. 15 // Writes a disk image to a device inside the utility process.
15 class ImageWriterUtilityClient : public content::UtilityProcessHostClient { 16 class ImageWriterUtilityClient : public content::UtilityProcessHostClient {
16 public: 17 public:
17 typedef base::Callback<void()> CancelCallback; 18 typedef base::Callback<void()> CancelCallback;
18 typedef base::Callback<void()> SuccessCallback; 19 typedef base::Callback<void()> SuccessCallback;
19 typedef base::Callback<void(int64)> ProgressCallback; 20 typedef base::Callback<void(int64)> ProgressCallback;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void OnWriteImageFailed(const std::string& message); 73 void OnWriteImageFailed(const std::string& message);
73 void OnWriteImageProgress(int64 progress); 74 void OnWriteImageProgress(int64 progress);
74 75
75 CancelCallback cancel_callback_; 76 CancelCallback cancel_callback_;
76 ProgressCallback progress_callback_; 77 ProgressCallback progress_callback_;
77 SuccessCallback success_callback_; 78 SuccessCallback success_callback_;
78 ErrorCallback error_callback_; 79 ErrorCallback error_callback_;
79 80
80 base::WeakPtr<content::UtilityProcessHost> utility_process_host_; 81 base::WeakPtr<content::UtilityProcessHost> utility_process_host_;
81 82
82 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; 83 scoped_refptr<base::SingleThreadTaskRunner> thread_task_runner_;
83 84
84 DISALLOW_COPY_AND_ASSIGN(ImageWriterUtilityClient); 85 DISALLOW_COPY_AND_ASSIGN(ImageWriterUtilityClient);
85 }; 86 };
86 87
87 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILI TY_CLIENT_H_ 88 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILI TY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698