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

Side by Side Diff: dbus/object_manager.h

Issue 177703006: dbus: Handle NameOwnerChanged in ObjectManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | dbus/object_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef DBUS_OBJECT_MANAGER_H_ 5 #ifndef DBUS_OBJECT_MANAGER_H_
6 #define DBUS_OBJECT_MANAGER_H_ 6 #define DBUS_OBJECT_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 const std::string& interface_name, 266 const std::string& interface_name,
267 MessageReader* reader); 267 MessageReader* reader);
268 268
269 // Removes the properties structure of the object with path |object_path| 269 // Removes the properties structure of the object with path |object_path|
270 // for the interfaces named |interface_name|. 270 // for the interfaces named |interface_name|.
271 // 271 //
272 // If no further interfaces remain, the entry in the ObjectMap is discarded. 272 // If no further interfaces remain, the entry in the ObjectMap is discarded.
273 void RemoveInterface(const ObjectPath& object_path, 273 void RemoveInterface(const ObjectPath& object_path,
274 const std::string& interface_name); 274 const std::string& interface_name);
275 275
276 // Removes all objects and interfaces from the object manager when
277 // |old_owner| is not the empty string and/or re-requests the set of managed
278 // objects when |new_owner| is not the empty string.
279 void NameOwnerChanged(const std::string& old_owner,
280 const std::string& new_owner);
281
276 Bus* bus_; 282 Bus* bus_;
277 std::string service_name_; 283 std::string service_name_;
278 ObjectPath object_path_; 284 ObjectPath object_path_;
279 ObjectProxy* object_proxy_; 285 ObjectProxy* object_proxy_;
280 286
281 // Maps the name of an interface to the implementation class used for 287 // Maps the name of an interface to the implementation class used for
282 // instantiating PropertySet structures for that interface's properties. 288 // instantiating PropertySet structures for that interface's properties.
283 typedef std::map<std::string, Interface*> InterfaceMap; 289 typedef std::map<std::string, Interface*> InterfaceMap;
284 InterfaceMap interface_map_; 290 InterfaceMap interface_map_;
285 291
(...skipping 21 matching lines...) Expand all
307 // Note: This should remain the last member so it'll be destroyed and 313 // Note: This should remain the last member so it'll be destroyed and
308 // invalidate its weak pointers before any other members are destroyed. 314 // invalidate its weak pointers before any other members are destroyed.
309 base::WeakPtrFactory<ObjectManager> weak_ptr_factory_; 315 base::WeakPtrFactory<ObjectManager> weak_ptr_factory_;
310 316
311 DISALLOW_COPY_AND_ASSIGN(ObjectManager); 317 DISALLOW_COPY_AND_ASSIGN(ObjectManager);
312 }; 318 };
313 319
314 } // namespace dbus 320 } // namespace dbus
315 321
316 #endif // DBUS_OBJECT_MANAGER_H_ 322 #endif // DBUS_OBJECT_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | dbus/object_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698