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

Unified Diff: mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h

Issue 274733004: Deletion/ownership (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h b/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h
index f161516df6a2597921af5a3cb7e10be9e3546dfc..78ae300f6f64848ca485423e4c554814527ca5f7 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_vector.h"
+#include "base/memory/weak_ptr.h"
#include "mojo/public/cpp/bindings/remote_ptr.h"
#include "mojo/services/public/cpp/view_manager/view_manager_types.h"
#include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
@@ -41,6 +42,8 @@ class ViewManagerSynchronizer : public IViewManagerClient {
void AddChild(TransportNodeId child_id, TransportNodeId parent_id);
void RemoveChild(TransportNodeId child_id, TransportNodeId parent_id);
+ bool OwnsNode(TransportNodeId id) const;
+
private:
friend class ViewManagerTransaction;
typedef ScopedVector<ViewManagerTransaction> Transactions;
@@ -55,6 +58,7 @@ class ViewManagerSynchronizer : public IViewManagerClient {
uint32_t new_view_id,
uint32_t old_view_id,
uint32_t change_id) OVERRIDE;
+ virtual void OnNodeDeleted(uint32_t node_id, uint32_t change_id) OVERRIDE;
// Called to schedule a sync of the client model with the service after a
// return to the message loop.
@@ -84,6 +88,8 @@ class ViewManagerSynchronizer : public IViewManagerClient {
Transactions pending_transactions_;
+ base::WeakPtrFactory<ViewManagerSynchronizer> sync_factory_;
+
// Non-NULL while blocking on the connection to |service_| during
// construction.
base::RunLoop* init_loop_;

Powered by Google App Engine
This is Rietveld 408576698