| 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 COMPONENTS_MUS_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ |
| 6 #define COMPONENTS_MUS_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include "components/mus/public/cpp/types.h" | 8 #include "components/mus/public/cpp/types.h" |
| 9 #include "components/mus/public/cpp/view.h" | 9 #include "components/mus/public/cpp/view.h" |
| 10 #include "components/mus/public/cpp/view_tree_connection.h" | 10 #include "components/mus/public/cpp/view_tree_connection.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // refers to the root view. | 35 // refers to the root view. |
| 36 void AddChild(Id child_id, Id parent_id); | 36 void AddChild(Id child_id, Id parent_id); |
| 37 void RemoveChild(Id child_id, Id parent_id); | 37 void RemoveChild(Id child_id, Id parent_id); |
| 38 | 38 |
| 39 void Reorder(Id view_id, Id relative_view_id, mojo::OrderDirection direction); | 39 void Reorder(Id view_id, Id relative_view_id, mojo::OrderDirection direction); |
| 40 | 40 |
| 41 // Returns true if the specified view was created by this connection. | 41 // Returns true if the specified view was created by this connection. |
| 42 bool OwnsView(Id id) const; | 42 bool OwnsView(Id id) const; |
| 43 | 43 |
| 44 void SetBounds(Id view_id, const mojo::Rect& bounds); | 44 void SetBounds(Id view_id, const mojo::Rect& bounds); |
| 45 void SetCapture(Id view_id); |
| 45 void SetFocus(Id view_id); | 46 void SetFocus(Id view_id); |
| 46 void SetVisible(Id view_id, bool visible); | 47 void SetVisible(Id view_id, bool visible); |
| 47 void SetProperty(Id view_id, | 48 void SetProperty(Id view_id, |
| 48 const std::string& name, | 49 const std::string& name, |
| 49 const std::vector<uint8_t>& data); | 50 const std::vector<uint8_t>& data); |
| 50 void SetViewTextInputState(Id view_id, mojo::TextInputStatePtr state); | 51 void SetViewTextInputState(Id view_id, mojo::TextInputStatePtr state); |
| 51 void SetImeVisibility(Id view_id, | 52 void SetImeVisibility(Id view_id, |
| 52 bool visible, | 53 bool visible, |
| 53 mojo::TextInputStatePtr state); | 54 mojo::TextInputStatePtr state); |
| 54 | 55 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 ConnectionSpecificId GetConnectionId() override; | 93 ConnectionSpecificId GetConnectionId() override; |
| 93 | 94 |
| 94 // Overridden from ViewTreeClient: | 95 // Overridden from ViewTreeClient: |
| 95 void OnEmbed(ConnectionSpecificId connection_id, | 96 void OnEmbed(ConnectionSpecificId connection_id, |
| 96 mojo::ViewDataPtr root, | 97 mojo::ViewDataPtr root, |
| 97 mojo::ViewTreePtr tree, | 98 mojo::ViewTreePtr tree, |
| 98 Id focused_view_id, | 99 Id focused_view_id, |
| 99 uint32_t access_policy) override; | 100 uint32_t access_policy) override; |
| 100 void OnEmbeddedAppDisconnected(Id view_id) override; | 101 void OnEmbeddedAppDisconnected(Id view_id) override; |
| 101 void OnUnembed() override; | 102 void OnUnembed() override; |
| 103 void OnLostCapture(Id view_id) override; |
| 102 void OnViewBoundsChanged(Id view_id, | 104 void OnViewBoundsChanged(Id view_id, |
| 103 mojo::RectPtr old_bounds, | 105 mojo::RectPtr old_bounds, |
| 104 mojo::RectPtr new_bounds) override; | 106 mojo::RectPtr new_bounds) override; |
| 105 void OnViewViewportMetricsChanged( | 107 void OnViewViewportMetricsChanged( |
| 106 mojo::ViewportMetricsPtr old_metrics, | 108 mojo::ViewportMetricsPtr old_metrics, |
| 107 mojo::ViewportMetricsPtr new_metrics) override; | 109 mojo::ViewportMetricsPtr new_metrics) override; |
| 108 void OnViewHierarchyChanged(Id view_id, | 110 void OnViewHierarchyChanged(Id view_id, |
| 109 Id new_parent_id, | 111 Id new_parent_id, |
| 110 Id old_parent_id, | 112 Id old_parent_id, |
| 111 mojo::Array<mojo::ViewDataPtr> views) override; | 113 mojo::Array<mojo::ViewDataPtr> views) override; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 bool is_embed_root_; | 152 bool is_embed_root_; |
| 151 | 153 |
| 152 bool in_destructor_; | 154 bool in_destructor_; |
| 153 | 155 |
| 154 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewTreeClientImpl); | 156 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewTreeClientImpl); |
| 155 }; | 157 }; |
| 156 | 158 |
| 157 } // namespace mus | 159 } // namespace mus |
| 158 | 160 |
| 159 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ | 161 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ |
| OLD | NEW |