OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/system_clock_client.h" | 5 #include "chromeos/dbus/system_clock_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
9 #include "dbus/bus.h" | 9 #include "dbus/bus.h" |
10 #include "dbus/message.h" | 10 #include "dbus/message.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, | 123 dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, |
124 base::Bind(&SystemClockClientImpl::OnGetCanSet, | 124 base::Bind(&SystemClockClientImpl::OnGetCanSet, |
125 weak_ptr_factory_.GetWeakPtr())); | 125 weak_ptr_factory_.GetWeakPtr())); |
126 } | 126 } |
127 | 127 |
128 // Whether the time can be set. Value is false until the first | 128 // Whether the time can be set. Value is false until the first |
129 // CanSetTime response is received. | 129 // CanSetTime response is received. |
130 bool can_set_time_; | 130 bool can_set_time_; |
131 bool can_set_time_initialized_; | 131 bool can_set_time_initialized_; |
132 dbus::ObjectProxy* system_clock_proxy_; | 132 dbus::ObjectProxy* system_clock_proxy_; |
133 ObserverList<Observer> observers_; | 133 base::ObserverList<Observer> observers_; |
134 | 134 |
135 base::WeakPtrFactory<SystemClockClientImpl> weak_ptr_factory_; | 135 base::WeakPtrFactory<SystemClockClientImpl> weak_ptr_factory_; |
136 | 136 |
137 DISALLOW_COPY_AND_ASSIGN(SystemClockClientImpl); | 137 DISALLOW_COPY_AND_ASSIGN(SystemClockClientImpl); |
138 }; | 138 }; |
139 | 139 |
140 void SystemClockClient::Observer::SystemClockUpdated() { | 140 void SystemClockClient::Observer::SystemClockUpdated() { |
141 } | 141 } |
142 | 142 |
143 void SystemClockClient::Observer::SystemClockCanSetTimeChanged( | 143 void SystemClockClient::Observer::SystemClockCanSetTimeChanged( |
144 bool can_set_time) { | 144 bool can_set_time) { |
145 } | 145 } |
146 | 146 |
147 SystemClockClient::SystemClockClient() { | 147 SystemClockClient::SystemClockClient() { |
148 } | 148 } |
149 | 149 |
150 SystemClockClient::~SystemClockClient() { | 150 SystemClockClient::~SystemClockClient() { |
151 } | 151 } |
152 | 152 |
153 // static | 153 // static |
154 SystemClockClient* SystemClockClient::Create() { | 154 SystemClockClient* SystemClockClient::Create() { |
155 return new SystemClockClientImpl(); | 155 return new SystemClockClientImpl(); |
156 } | 156 } |
157 | 157 |
158 } // namespace chromeos | 158 } // namespace chromeos |
OLD | NEW |