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

Side by Side Diff: mojo/services/public/cpp/view_manager/lib/view_manager_private.h

Issue 260863008: Add support for mapping node tree on the client. (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 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 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_ 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_ 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.h"
9 #include "mojo/services/public/cpp/view_manager/view_manager.h" 10 #include "mojo/services/public/cpp/view_manager/view_manager.h"
10 11
11 namespace mojo { 12 namespace mojo {
12 namespace services { 13 namespace services {
13 namespace view_manager { 14 namespace view_manager {
14 15
16 class ViewManagerObserver;
15 class ViewManagerSynchronizer; 17 class ViewManagerSynchronizer;
16 18
17 class ViewManagerPrivate { 19 class ViewManagerPrivate {
18 public: 20 public:
19 explicit ViewManagerPrivate(ViewManager* manager); 21 explicit ViewManagerPrivate(ViewManager* manager);
20 ~ViewManagerPrivate(); 22 ~ViewManagerPrivate();
21 23
22 ViewManagerSynchronizer* synchronizer() { 24 ViewManagerSynchronizer* synchronizer() {
23 return manager_->synchronizer_.get(); 25 return manager_->synchronizer_.get();
24 } 26 }
25 Shell* shell() { return manager_->shell_; } 27 Shell* shell() { return manager_->shell_; }
26 28
29 void set_tree(ViewTreeNode* root) { manager_->tree_.reset(root); }
30
31 // Returns true if the ViewManager's synchronizer is connected to the service.
32 bool connected() { return manager_->synchronizer_->connected(); }
33
34 void AddObserver(ViewManagerObserver* observer) {
35 manager_->AddObserver(observer);
36 }
37 void RemoveObserver(ViewManagerObserver* observer) {
38 manager_->RemoveObserver(observer);
39 }
40 ObserverList<ViewManagerObserver>* observers() {
41 return &manager_->observers_;
42 }
43
27 private: 44 private:
28 ViewManager* manager_; 45 ViewManager* manager_;
29 46
30 DISALLOW_COPY_AND_ASSIGN(ViewManagerPrivate); 47 DISALLOW_COPY_AND_ASSIGN(ViewManagerPrivate);
31 }; 48 };
32 49
33 } // namespace view_manager 50 } // namespace view_manager
34 } // namespace services 51 } // namespace services
35 } // namespace mojo 52 } // namespace mojo
36 53
37 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_ 54 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_PRIVATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698