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

Side by Side Diff: chromeos/dbus/image_burner_client.h

Issue 1540803002: Switch to standard integer types in chromeos/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 4 years, 12 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
« no previous file with comments | « chromeos/dbus/gsm_sms_client_unittest.cc ('k') | chromeos/dbus/image_burner_client.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) 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 CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_
6 #define CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_ 6 #define CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_
7 7
8 #include <stdint.h>
9
8 #include <string> 10 #include <string>
9 11
10 #include "base/basictypes.h"
11 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/macros.h"
12 #include "chromeos/chromeos_export.h" 14 #include "chromeos/chromeos_export.h"
13 #include "chromeos/dbus/dbus_client.h" 15 #include "chromeos/dbus/dbus_client.h"
14 16
15 namespace chromeos { 17 namespace chromeos {
16 18
17 // ImageBurnerClient is used to communicate with the image burner. 19 // ImageBurnerClient is used to communicate with the image burner.
18 // All method should be called from the origin thread (UI thread) which 20 // All method should be called from the origin thread (UI thread) which
19 // initializes the DBusThreadManager instance. 21 // initializes the DBusThreadManager instance.
20 class CHROMEOS_EXPORT ImageBurnerClient : public DBusClient { 22 class CHROMEOS_EXPORT ImageBurnerClient : public DBusClient {
21 public: 23 public:
22 ~ImageBurnerClient() override; 24 ~ImageBurnerClient() override;
23 25
24 // A callback to be called when DBus method call fails. 26 // A callback to be called when DBus method call fails.
25 typedef base::Callback<void()> ErrorCallback; 27 typedef base::Callback<void()> ErrorCallback;
26 28
27 // A callback to handle burn_finished signal. 29 // A callback to handle burn_finished signal.
28 typedef base::Callback<void(const std::string& target_path, 30 typedef base::Callback<void(const std::string& target_path,
29 bool success, 31 bool success,
30 const std::string& error)> BurnFinishedHandler; 32 const std::string& error)> BurnFinishedHandler;
31 33
32 // A callback to handle burn_progress_update signal. 34 // A callback to handle burn_progress_update signal.
33 typedef base::Callback<void(const std::string& target_path, 35 typedef base::Callback<void(const std::string& target_path,
34 int64 num_bytes_burnt, 36 int64_t num_bytes_burnt,
35 int64 total_size)> BurnProgressUpdateHandler; 37 int64_t total_size)> BurnProgressUpdateHandler;
36 38
37 // Burns the image |from_path| to the disk |to_path|. 39 // Burns the image |from_path| to the disk |to_path|.
38 virtual void BurnImage(const std::string& from_path, 40 virtual void BurnImage(const std::string& from_path,
39 const std::string& to_path, 41 const std::string& to_path,
40 const ErrorCallback& error_callback) = 0; 42 const ErrorCallback& error_callback) = 0;
41 43
42 // Sets callbacks as event handlers. 44 // Sets callbacks as event handlers.
43 // |burn_finished_handler| is called when burn_finished signal is received. 45 // |burn_finished_handler| is called when burn_finished signal is received.
44 // |burn_progress_update_handler| is called when burn_progress_update signal 46 // |burn_progress_update_handler| is called when burn_progress_update signal
45 // is received. 47 // is received.
(...skipping 13 matching lines...) Expand all
59 // Create() should be used instead. 61 // Create() should be used instead.
60 ImageBurnerClient(); 62 ImageBurnerClient();
61 63
62 private: 64 private:
63 DISALLOW_COPY_AND_ASSIGN(ImageBurnerClient); 65 DISALLOW_COPY_AND_ASSIGN(ImageBurnerClient);
64 }; 66 };
65 67
66 } // namespace chromeos 68 } // namespace chromeos
67 69
68 #endif // CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_ 70 #endif // CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/gsm_sms_client_unittest.cc ('k') | chromeos/dbus/image_burner_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698