OLD | NEW |
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/view_manager.h" | 5 #include "mojo/services/public/cpp/view_manager/view_manager.h" |
6 | 6 |
7 #include "mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h" | 7 #include "mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h" |
8 | 8 |
9 namespace mojo { | 9 namespace mojo { |
10 namespace services { | 10 namespace services { |
11 namespace view_manager { | 11 namespace view_manager { |
12 | 12 |
13 ViewManager::ViewManager(Shell* shell) | 13 ViewManager::ViewManager(Shell* shell) |
14 : shell_(shell), | 14 : shell_(shell), |
15 synchronizer_(new ViewManagerSynchronizer(this)) {} | 15 synchronizer_(new ViewManagerSynchronizer(this)) {} |
16 ViewManager::~ViewManager() {} | 16 ViewManager::~ViewManager() {} |
17 | 17 |
18 void ViewManager::BuildNodeTree(const mojo::Callback<void()>& callback) { | |
19 synchronizer_->BuildNodeTree(callback); | |
20 } | |
21 | |
22 void ViewManager::AddObserver(ViewManagerObserver* observer) { | |
23 observers_.AddObserver(observer); | |
24 } | |
25 | |
26 void ViewManager::RemoveObserver(ViewManagerObserver* observer) { | |
27 observers_.RemoveObserver(observer); | |
28 } | |
29 | |
30 } // namespace view_manager | 18 } // namespace view_manager |
31 } // namespace services | 19 } // namespace services |
32 } // namespace mojo | 20 } // namespace mojo |
OLD | NEW |