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

Side by Side Diff: chrome/browser/chromeos/dbus/bluetooth_property.cc

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 #include "chrome/browser/chromeos/dbus/bluetooth_property.h"
6
7 #include "base/bind.h"
8 #include "dbus/message.h"
9 #include "dbus/object_proxy.h"
10 #include "third_party/cros_system_api/dbus/service_constants.h"
11
12 namespace chromeos {
13
14 void BluetoothPropertySet::ConnectSignals() {
15 dbus::ObjectProxy* object_proxy = this->object_proxy();
16 DCHECK(object_proxy);
17 object_proxy->ConnectToSignal(
18 interface(),
19 bluetooth_common::kPropertyChangedSignal,
20 base::Bind(&dbus::PropertySet::ChangedReceived, GetWeakPtr()),
21 base::Bind(&dbus::PropertySet::ChangedConnected, GetWeakPtr()));
22 }
23
24 void BluetoothPropertySet::ChangedReceived(dbus::Signal* signal) {
25 DCHECK(signal);
26
27 dbus::MessageReader reader(signal);
28 UpdatePropertyFromReader(&reader);
29 }
30
31 void BluetoothPropertySet::GetAll() {
32 dbus::MethodCall method_call(interface(),
33 bluetooth_common::kGetProperties);
34
35 dbus::ObjectProxy* object_proxy = this->object_proxy();
36 DCHECK(object_proxy);
37 object_proxy->CallMethod(&method_call,
38 dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
39 base::Bind(&dbus::PropertySet::OnGetAll,
40 GetWeakPtr()));
41 }
42
43 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dbus/bluetooth_property.h ('k') | chrome/browser/chromeos/dbus/cashew_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698