| 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 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_ |
| 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // Investigate some kind of smart pointer or weak pointer for these. | 31 // Investigate some kind of smart pointer or weak pointer for these. |
| 32 class View { | 32 class View { |
| 33 public: | 33 public: |
| 34 typedef std::vector<View*> Children; | 34 typedef std::vector<View*> Children; |
| 35 | 35 |
| 36 static View* Create(ViewManager* view_manager); | 36 static View* Create(ViewManager* view_manager); |
| 37 | 37 |
| 38 // Destroys this view and all its children. | 38 // Destroys this view and all its children. |
| 39 void Destroy(); | 39 void Destroy(); |
| 40 | 40 |
| 41 ViewManager* view_manager() { return manager_; } |
| 42 |
| 41 // Configuration. | 43 // Configuration. |
| 42 Id id() const { return id_; } | 44 Id id() const { return id_; } |
| 43 | 45 |
| 44 // Geometric disposition. | 46 // Geometric disposition. |
| 45 const gfx::Rect& bounds() { return bounds_; } | 47 const gfx::Rect& bounds() { return bounds_; } |
| 46 void SetBounds(const gfx::Rect& bounds); | 48 void SetBounds(const gfx::Rect& bounds); |
| 47 | 49 |
| 48 // Visibility. | 50 // Visibility. |
| 49 void SetVisible(bool value); | 51 void SetVisible(bool value); |
| 50 // TODO(sky): add accessor. | 52 // TODO(sky): add accessor. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 ObserverList<ViewObserver> observers_; | 110 ObserverList<ViewObserver> observers_; |
| 109 | 111 |
| 110 gfx::Rect bounds_; | 112 gfx::Rect bounds_; |
| 111 | 113 |
| 112 DISALLOW_COPY_AND_ASSIGN(View); | 114 DISALLOW_COPY_AND_ASSIGN(View); |
| 113 }; | 115 }; |
| 114 | 116 |
| 115 } // namespace mojo | 117 } // namespace mojo |
| 116 | 118 |
| 117 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_ | 119 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_H_ |
| OLD | NEW |