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

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

Issue 341553002: Remove OnRootRemoved from ViewManagerDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_client_impl.h" 5 #include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 return; 808 return;
809 } 809 }
810 roots_.push_back(root); 810 roots_.push_back(root);
811 root->AddObserver(new RootObserver(root)); 811 root->AddObserver(new RootObserver(root));
812 delegate_->OnRootAdded(this, root); 812 delegate_->OnRootAdded(this, root);
813 } 813 }
814 814
815 void ViewManagerClientImpl::RemoveRoot(Node* root) { 815 void ViewManagerClientImpl::RemoveRoot(Node* root) {
816 std::vector<Node*>::iterator it = 816 std::vector<Node*>::iterator it =
817 std::find(roots_.begin(), roots_.end(), root); 817 std::find(roots_.begin(), roots_.end(), root);
818 if (it != roots_.end()) { 818 if (it != roots_.end())
819 roots_.erase(it); 819 roots_.erase(it);
820 delegate_->OnRootRemoved(this, root);
821 }
822 } 820 }
823 821
824 //////////////////////////////////////////////////////////////////////////////// 822 ////////////////////////////////////////////////////////////////////////////////
825 // ViewManager, public: 823 // ViewManager, public:
826 824
827 // static 825 // static
828 void ViewManager::Create(Application* application, 826 void ViewManager::Create(Application* application,
829 ViewManagerDelegate* delegate) { 827 ViewManagerDelegate* delegate) {
830 application->AddService<ViewManagerClientImpl>(delegate); 828 application->AddService<ViewManagerClientImpl>(delegate);
831 } 829 }
832 830
833 } // namespace view_manager 831 } // namespace view_manager
834 } // namespace mojo 832 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698