OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FAKE_DEBUG_DAEMON_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_ |
6 #define CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 | 10 |
11 #include <map> | 11 #include <map> |
| 12 #include <set> |
12 #include <string> | 13 #include <string> |
13 #include <vector> | 14 #include <vector> |
14 | 15 |
15 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
16 #include "base/macros.h" | 17 #include "base/macros.h" |
17 #include "chromeos/dbus/debug_daemon_client.h" | 18 #include "chromeos/dbus/debug_daemon_client.h" |
18 | 19 |
19 namespace chromeos { | 20 namespace chromeos { |
20 | 21 |
21 // The DebugDaemonClient implementation used on Linux desktop, | 22 // The DebugDaemonClient implementation used on Linux desktop, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 const std::string& password, | 65 const std::string& password, |
65 const EnableDebuggingCallback& callback) override; | 66 const EnableDebuggingCallback& callback) override; |
66 void QueryDebuggingFeatures( | 67 void QueryDebuggingFeatures( |
67 const QueryDevFeaturesCallback& callback) override; | 68 const QueryDevFeaturesCallback& callback) override; |
68 void RemoveRootfsVerification( | 69 void RemoveRootfsVerification( |
69 const EnableDebuggingCallback& callback) override; | 70 const EnableDebuggingCallback& callback) override; |
70 void WaitForServiceToBeAvailable( | 71 void WaitForServiceToBeAvailable( |
71 const WaitForServiceToBeAvailableCallback& callback) override; | 72 const WaitForServiceToBeAvailableCallback& callback) override; |
72 void SetOomScoreAdj(const std::map<pid_t, int32_t>& pid_to_oom_score_adj, | 73 void SetOomScoreAdj(const std::map<pid_t, int32_t>& pid_to_oom_score_adj, |
73 const SetOomScoreAdjCallback& callback) override; | 74 const SetOomScoreAdjCallback& callback) override; |
| 75 void CupsAddPrinter(const std::string& name, |
| 76 const std::string& uri, |
| 77 const std::string& ppd_path, |
| 78 bool ipp_everywhere, |
| 79 const CupsAddPrinterCallback& callback, |
| 80 const base::Closure& error_callback) override; |
| 81 void CupsRemovePrinter(const std::string& name, |
| 82 const CupsRemovePrinterCallback& callback, |
| 83 const base::Closure& error_callback) override; |
74 | 84 |
75 // Sets debugging features mask for testing. | 85 // Sets debugging features mask for testing. |
76 virtual void SetDebuggingFeaturesStatus(int featues_mask); | 86 virtual void SetDebuggingFeaturesStatus(int featues_mask); |
77 | 87 |
78 // Changes the behavior of WaitForServiceToBeAvailable(). This method runs | 88 // Changes the behavior of WaitForServiceToBeAvailable(). This method runs |
79 // pending callbacks if is_available is true. | 89 // pending callbacks if is_available is true. |
80 void SetServiceIsAvailable(bool is_available); | 90 void SetServiceIsAvailable(bool is_available); |
81 | 91 |
82 private: | 92 private: |
83 int featues_mask_; | 93 int featues_mask_; |
84 | 94 |
85 bool service_is_available_; | 95 bool service_is_available_; |
86 std::vector<WaitForServiceToBeAvailableCallback> | 96 std::vector<WaitForServiceToBeAvailableCallback> |
87 pending_wait_for_service_to_be_available_callbacks_; | 97 pending_wait_for_service_to_be_available_callbacks_; |
| 98 std::set<std::string> printers_; |
88 | 99 |
89 DISALLOW_COPY_AND_ASSIGN(FakeDebugDaemonClient); | 100 DISALLOW_COPY_AND_ASSIGN(FakeDebugDaemonClient); |
90 }; | 101 }; |
91 | 102 |
92 } // namespace chromeos | 103 } // namespace chromeos |
93 | 104 |
94 #endif // CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_ | 105 #endif // CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_ |
OLD | NEW |