| OLD | NEW |
| 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 #include "dbus/property.h" | 5 #include "dbus/property.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 DCHECK(!property_set_); | 22 DCHECK(!property_set_); |
| 23 property_set_ = property_set; | 23 property_set_ = property_set; |
| 24 name_ = name; | 24 name_ = name; |
| 25 } | 25 } |
| 26 | 26 |
| 27 | 27 |
| 28 // | 28 // |
| 29 // PropertySet implementation. | 29 // PropertySet implementation. |
| 30 // | 30 // |
| 31 | 31 |
| 32 PropertySet::PropertySet(ObjectProxy* object_proxy, | 32 PropertySet::PropertySet( |
| 33 const std::string& interface, | 33 ObjectProxy* object_proxy, |
| 34 PropertyChangedCallback property_changed_callback) | 34 const std::string& interface, |
| 35 const PropertyChangedCallback& property_changed_callback) |
| 35 : object_proxy_(object_proxy), | 36 : object_proxy_(object_proxy), |
| 36 interface_(interface), | 37 interface_(interface), |
| 37 property_changed_callback_(property_changed_callback), | 38 property_changed_callback_(property_changed_callback), |
| 38 weak_ptr_factory_(this) {} | 39 weak_ptr_factory_(this) {} |
| 39 | 40 |
| 40 PropertySet::~PropertySet() { | 41 PropertySet::~PropertySet() { |
| 41 } | 42 } |
| 42 | 43 |
| 43 void PropertySet::RegisterProperty(const std::string& name, | 44 void PropertySet::RegisterProperty(const std::string& name, |
| 44 PropertyBase* property) { | 45 PropertyBase* property) { |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 template <> | 443 template <> |
| 443 void Property<std::vector<ObjectPath> >::AppendSetValueToWriter( | 444 void Property<std::vector<ObjectPath> >::AppendSetValueToWriter( |
| 444 MessageWriter* writer) { | 445 MessageWriter* writer) { |
| 445 MessageWriter variant_writer(NULL); | 446 MessageWriter variant_writer(NULL); |
| 446 writer->OpenVariant("ao", &variant_writer); | 447 writer->OpenVariant("ao", &variant_writer); |
| 447 variant_writer.AppendArrayOfObjectPaths(set_value_); | 448 variant_writer.AppendArrayOfObjectPaths(set_value_); |
| 448 writer->CloseContainer(&variant_writer); | 449 writer->CloseContainer(&variant_writer); |
| 449 } | 450 } |
| 450 | 451 |
| 451 } // namespace dbus | 452 } // namespace dbus |
| OLD | NEW |