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

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

Issue 2232203003: Implement a dbus client for CupsTool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert client bundle Created 4 years, 3 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 CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_
6 #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ 6 #define CHROMEOS_DBUS_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
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 SetOomScoreAdjCallback; 202 SetOomScoreAdjCallback;
203 203
204 // Set OOM score oom_score_adj for some process. 204 // Set OOM score oom_score_adj for some process.
205 // Note that the corresponding DBus configuration of the debugd method 205 // Note that the corresponding DBus configuration of the debugd method
206 // "SetOomScoreAdj" only permits setting OOM score for processes running by 206 // "SetOomScoreAdj" only permits setting OOM score for processes running by
207 // user chronos or Android apps. 207 // user chronos or Android apps.
208 virtual void SetOomScoreAdj( 208 virtual void SetOomScoreAdj(
209 const std::map<pid_t, int32_t>& pid_to_oom_score_adj, 209 const std::map<pid_t, int32_t>& pid_to_oom_score_adj,
210 const SetOomScoreAdjCallback& callback) = 0; 210 const SetOomScoreAdjCallback& callback) = 0;
211 211
212 // A callback to handle the result of AddPrinter.
hashimoto 2016/09/12 05:20:36 nit: "the result of CupsAddPrinter."
skau 2016/09/12 17:53:56 Done.
213 using AddPrinterCallback = base::Callback<void(bool success)>;
hashimoto 2016/09/12 05:20:36 nit: CupsAddPrinterCallback should be more intuiti
skau 2016/09/12 17:53:56 Done.
214
215 // Calls CupsAddPrinter. |name| is the printer name. |uri| is the device
216 // uri. |ppd_path| is the absolute path to the PPD file. |ipp_everywhere|
217 // is true for autoconf of IPP Everywhere printers. |callback| is called
218 // after method success, |error_callback| otherwise.
hashimoto 2016/09/12 05:20:36 nit: In "|callback| is called after method success
skau 2016/09/12 17:53:56 Done.
219 virtual void CupsAddPrinter(const std::string& name,
220 const std::string& uri,
221 const std::string& ppd_path,
222 bool ipp_everywhere,
223 const AddPrinterCallback& callback,
224 const base::Closure& error_callback) = 0;
225
226 // A callback to handle the result of RemovePrinter.
hashimoto 2016/09/12 05:20:36 ditto.
skau 2016/09/12 17:53:56 Done.
227 using RemovePrinterCallback = base::Callback<void(bool success)>;
hashimoto 2016/09/12 05:20:36 ditto.
skau 2016/09/12 17:53:56 Done.
228
229 // Calls CupsRemovePrinter. |name| is the printer name as registered in
230 // CUPS. |callback| is called on success, |error_callback| otherwise.
hashimoto 2016/09/12 05:20:36 ditto.
skau 2016/09/12 17:53:56 Done.
231 virtual void CupsRemovePrinter(const std::string& name,
232 const RemovePrinterCallback& callback,
233 const base::Closure& error_callback) = 0;
234
212 // Factory function, creates a new instance and returns ownership. 235 // Factory function, creates a new instance and returns ownership.
213 // For normal usage, access the singleton via DBusThreadManager::Get(). 236 // For normal usage, access the singleton via DBusThreadManager::Get().
214 static DebugDaemonClient* Create(); 237 static DebugDaemonClient* Create();
215 238
216 protected: 239 protected:
217 // Create() should be used instead. 240 // Create() should be used instead.
218 DebugDaemonClient(); 241 DebugDaemonClient();
219 242
220 private: 243 private:
221 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); 244 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient);
222 }; 245 };
223 246
224 } // namespace chromeos 247 } // namespace chromeos
225 248
226 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ 249 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/debug_daemon_client.cc » ('j') | chromeos/dbus/debug_daemon_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698