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

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

Issue 328873002: Renames view manager Connect methods to Embed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mispelling 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
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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 : ViewManagerTransaction(TYPE_EMBED, synchronizer), 441 : ViewManagerTransaction(TYPE_EMBED, synchronizer),
442 url_(url), 442 url_(url),
443 node_id_(node_id) {} 443 node_id_(node_id) {}
444 virtual ~EmbedTransaction() {} 444 virtual ~EmbedTransaction() {}
445 445
446 private: 446 private:
447 // Overridden from ViewManagerTransaction: 447 // Overridden from ViewManagerTransaction:
448 virtual void DoCommit() OVERRIDE { 448 virtual void DoCommit() OVERRIDE {
449 std::vector<Id> ids; 449 std::vector<Id> ids;
450 ids.push_back(node_id_); 450 ids.push_back(node_id_);
451 service()->Connect(url_, Array<Id>::From(ids), 451 service()->Embed(url_, Array<Id>::From(ids), ActionCompletedCallback());
452 ActionCompletedCallback());
453 } 452 }
454 virtual void DoActionCompleted(bool success) OVERRIDE { 453 virtual void DoActionCompleted(bool success) OVERRIDE {
455 // TODO(beng): recovery? 454 // TODO(beng): recovery?
456 } 455 }
457 456
458 const String url_; 457 const String url_;
459 const Id node_id_; 458 const Id node_id_;
460 459
461 DISALLOW_COPY_AND_ASSIGN(EmbedTransaction); 460 DISALLOW_COPY_AND_ASSIGN(EmbedTransaction);
462 }; 461 };
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 // ViewManager, public: 765 // ViewManager, public:
767 766
768 // static 767 // static
769 void ViewManager::Create(Application* application, 768 void ViewManager::Create(Application* application,
770 ViewManagerDelegate* delegate) { 769 ViewManagerDelegate* delegate) {
771 application->AddService<ViewManagerSynchronizer>(delegate); 770 application->AddService<ViewManagerSynchronizer>(delegate);
772 } 771 }
773 772
774 } // namespace view_manager 773 } // namespace view_manager
775 } // namespace mojo 774 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/examples/demo_launcher/demo_launcher.cc ('k') | mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698