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

Side by Side Diff: mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc

Issue 331243002: Makes IViewManager::DeleteNode take the server_change_id (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolve merge Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | mojo/services/public/interfaces/view_manager/view_manager.mojom » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h" 5 #include "mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "mojo/public/cpp/application/application.h" 9 #include "mojo/public/cpp/application/application.h"
10 #include "mojo/public/cpp/application/connect.h" 10 #include "mojo/public/cpp/application/connect.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 public: 228 public:
229 DestroyViewTreeNodeTransaction(Id node_id, 229 DestroyViewTreeNodeTransaction(Id node_id,
230 ViewManagerSynchronizer* synchronizer) 230 ViewManagerSynchronizer* synchronizer)
231 : ViewManagerTransaction(synchronizer), 231 : ViewManagerTransaction(synchronizer),
232 node_id_(node_id) {} 232 node_id_(node_id) {}
233 virtual ~DestroyViewTreeNodeTransaction() {} 233 virtual ~DestroyViewTreeNodeTransaction() {}
234 234
235 private: 235 private:
236 // Overridden from ViewManagerTransaction: 236 // Overridden from ViewManagerTransaction:
237 virtual void DoCommit() OVERRIDE { 237 virtual void DoCommit() OVERRIDE {
238 GetAndAdvanceNextServerChangeId(); 238 service()->DeleteNode(node_id_,
239 service()->DeleteNode(node_id_, ActionCompletedCallback()); 239 GetAndAdvanceNextServerChangeId(),
240 ActionCompletedCallback());
240 } 241 }
241 virtual void DoActionCompleted(bool success) OVERRIDE { 242 virtual void DoActionCompleted(bool success) OVERRIDE {
242 // TODO(beng): recovery? 243 // TODO(beng): recovery?
243 } 244 }
244 245
245 const Id node_id_; 246 const Id node_id_;
246 DISALLOW_COPY_AND_ASSIGN(DestroyViewTreeNodeTransaction); 247 DISALLOW_COPY_AND_ASSIGN(DestroyViewTreeNodeTransaction);
247 }; 248 };
248 249
249 class AddChildTransaction : public ViewManagerTransaction { 250 class AddChildTransaction : public ViewManagerTransaction {
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 // ViewManager, public: 831 // ViewManager, public:
831 832
832 // static 833 // static
833 void ViewManager::Create(Application* application, 834 void ViewManager::Create(Application* application,
834 ViewManagerDelegate* delegate) { 835 ViewManagerDelegate* delegate) {
835 application->AddService<ViewManagerSynchronizer>(delegate); 836 application->AddService<ViewManagerSynchronizer>(delegate);
836 } 837 }
837 838
838 } // namespace view_manager 839 } // namespace view_manager
839 } // namespace mojo 840 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/services/public/interfaces/view_manager/view_manager.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698