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
3 // found in the LICENSE file.
5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_PRIVATE_H_
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_PRIVATE_H_
8 #include "base/basictypes.h"
10 #include "mojo/services/public/cpp/view_manager/view.h"
16 explicit ViewPrivate(View
* view
);
19 static View
* LocalCreate();
21 ObserverList
<ViewObserver
>* observers() { return &view_
->observers_
; }
23 void ClearParent() { view_
->parent_
= NULL
; }
25 void set_id(Id id
) { view_
->id_
= id
; }
27 ViewManager
* view_manager() { return view_
->manager_
; }
28 void set_view_manager(ViewManager
* manager
) {
29 view_
->manager_
= manager
;
33 view_
->LocalDestroy();
35 void LocalAddChild(View
* child
) {
36 view_
->LocalAddChild(child
);
38 void LocalRemoveChild(View
* child
) {
39 view_
->LocalRemoveChild(child
);
41 void LocalReorder(View
* relative
, OrderDirection direction
) {
42 view_
->LocalReorder(relative
, direction
);
44 void LocalSetBounds(const gfx::Rect
& old_bounds
,
45 const gfx::Rect
& new_bounds
) {
46 view_
->LocalSetBounds(old_bounds
, new_bounds
);
52 DISALLOW_COPY_AND_ASSIGN(ViewPrivate
);
57 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_PRIVATE_H_