OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "chromeos/dbus/privet_daemon_manager_client.h" | 5 #include "chromeos/dbus/privet_daemon_manager_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 private: | 64 private: |
65 // Called by dbus::PropertySet when a property value is changed, | 65 // Called by dbus::PropertySet when a property value is changed, |
66 // either by result of a signal or response to a GetAll() or Get() | 66 // either by result of a signal or response to a GetAll() or Get() |
67 // call. Informs observers. | 67 // call. Informs observers. |
68 void OnManagerPropertyChanged(const std::string& property_name); | 68 void OnManagerPropertyChanged(const std::string& property_name); |
69 void OnVoidDBusMethod(const VoidDBusMethodCallback& callback, | 69 void OnVoidDBusMethod(const VoidDBusMethodCallback& callback, |
70 dbus::Response* response); | 70 dbus::Response* response); |
71 | 71 |
72 // List of observers interested in event notifications from us. | 72 // List of observers interested in event notifications from us. |
73 ObserverList<Observer> observers_; | 73 base::ObserverList<Observer> observers_; |
74 dbus::ObjectManager* object_manager_; | 74 dbus::ObjectManager* object_manager_; |
75 base::WeakPtrFactory<PrivetDaemonManagerClientImpl> weak_ptr_factory_; | 75 base::WeakPtrFactory<PrivetDaemonManagerClientImpl> weak_ptr_factory_; |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(PrivetDaemonManagerClientImpl); | 77 DISALLOW_COPY_AND_ASSIGN(PrivetDaemonManagerClientImpl); |
78 }; | 78 }; |
79 | 79 |
80 PrivetDaemonManagerClientImpl::PrivetDaemonManagerClientImpl() | 80 PrivetDaemonManagerClientImpl::PrivetDaemonManagerClientImpl() |
81 : object_manager_(nullptr), weak_ptr_factory_(this) { | 81 : object_manager_(nullptr), weak_ptr_factory_(this) { |
82 } | 82 } |
83 | 83 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 268 |
269 PrivetDaemonManagerClient::~PrivetDaemonManagerClient() { | 269 PrivetDaemonManagerClient::~PrivetDaemonManagerClient() { |
270 } | 270 } |
271 | 271 |
272 // static | 272 // static |
273 PrivetDaemonManagerClient* PrivetDaemonManagerClient::Create() { | 273 PrivetDaemonManagerClient* PrivetDaemonManagerClient::Create() { |
274 return new PrivetDaemonManagerClientImpl(); | 274 return new PrivetDaemonManagerClientImpl(); |
275 } | 275 } |
276 | 276 |
277 } // namespace chromeos | 277 } // namespace chromeos |
OLD | NEW |