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

Side by Side Diff: chrome/browser/chromeos/dbus/cashew_client.h

Issue 9838085: Move files inside chrome/browser/chromeos/dbus to chromeos/dbus (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_CASHEW_CLIENT_H_
6 #define CHROME_BROWSER_CHROMEOS_DBUS_CASHEW_CLIENT_H_
7 #pragma once
8
9 #include <string>
10 #include <vector>
11
12 #include "base/basictypes.h"
13 #include "base/callback.h"
14 #include "chrome/browser/chromeos/dbus/dbus_client_implementation_type.h"
15
16 namespace base {
17 class ListValue;
18 }
19
20 namespace dbus {
21 class Bus;
22 }
23
24 namespace chromeos {
25
26 // CashewClient is used to communicate with the Cashew service.
27 // All methods should be called from the origin thread (UI thread) which
28 // initializes the DBusThreadManager instance.
29 class CashewClient {
30 public:
31 // A callback to handle "DataPlansUpdate" signal.
32 // |service| is the D-Bus path of the cellular service.
33 // (e.g. /service/cellular_0271266ce2ce_310260467781434)
34 typedef base::Callback<void(const std::string& service,
35 const base::ListValue& data_plans)>
36 DataPlansUpdateHandler;
37
38 virtual ~CashewClient();
39
40 // Factory function, creates a new instance and returns ownership.
41 // For normal usage, access the singleton via DBusThreadManager::Get().
42 static CashewClient* Create(DBusClientImplementationType type,
43 dbus::Bus* bus);
44
45 // Sets DataPlansUpdate signal handler.
46 virtual void SetDataPlansUpdateHandler(DataPlansUpdateHandler handler) = 0;
47
48 // Resets DataPlansUpdate signal handler.
49 virtual void ResetDataPlansUpdateHandler() = 0;
50
51 // Calls RequestDataPlansUpdate method.
52 virtual void RequestDataPlansUpdate() = 0;
53
54 protected:
55 // Create() should be used instead.
56 CashewClient();
57
58 private:
59 DISALLOW_COPY_AND_ASSIGN(CashewClient);
60 };
61
62 } // namespace chromeos
63
64 #endif // CHROME_BROWSER_CHROMEOS_DBUS_CASHEW_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dbus/bluetooth_property.cc ('k') | chrome/browser/chromeos/dbus/cashew_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698