| 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_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ | 5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ |
| 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ | 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include "components/view_manager/public/cpp/types.h" | 8 #include "components/view_manager/public/cpp/types.h" |
| 9 #include "components/view_manager/public/cpp/view.h" | 9 #include "components/view_manager/public/cpp/view.h" |
| 10 #include "components/view_manager/public/cpp/view_tree_connection.h" | 10 #include "components/view_manager/public/cpp/view_tree_connection.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // refers to the root view. | 34 // refers to the root view. |
| 35 void AddChild(Id child_id, Id parent_id); | 35 void AddChild(Id child_id, Id parent_id); |
| 36 void RemoveChild(Id child_id, Id parent_id); | 36 void RemoveChild(Id child_id, Id parent_id); |
| 37 | 37 |
| 38 void Reorder(Id view_id, Id relative_view_id, OrderDirection direction); | 38 void Reorder(Id view_id, Id relative_view_id, OrderDirection direction); |
| 39 | 39 |
| 40 // Returns true if the specified view was created by this connection. | 40 // Returns true if the specified view was created by this connection. |
| 41 bool OwnsView(Id id) const; | 41 bool OwnsView(Id id) const; |
| 42 | 42 |
| 43 void SetBounds(Id view_id, const Rect& bounds); | 43 void SetBounds(Id view_id, const Rect& bounds); |
| 44 void SetSurfaceId(Id view_id, SurfaceIdPtr surface_id); | |
| 45 void SetFocus(Id view_id); | 44 void SetFocus(Id view_id); |
| 46 void SetVisible(Id view_id, bool visible); | 45 void SetVisible(Id view_id, bool visible); |
| 47 void SetProperty(Id view_id, | 46 void SetProperty(Id view_id, |
| 48 const std::string& name, | 47 const std::string& name, |
| 49 const std::vector<uint8_t>& data); | 48 const std::vector<uint8_t>& data); |
| 50 void SetViewTextInputState(Id view_id, TextInputStatePtr state); | 49 void SetViewTextInputState(Id view_id, TextInputStatePtr state); |
| 51 void SetImeVisibility(Id view_id, bool visible, TextInputStatePtr state); | 50 void SetImeVisibility(Id view_id, bool visible, TextInputStatePtr state); |
| 52 | 51 |
| 53 void Embed(const String& url, Id view_id); | 52 void Embed(const String& url, Id view_id); |
| 54 void Embed(mojo::URLRequestPtr request, | 53 void Embed(mojo::URLRequestPtr request, |
| 55 Id view_id, | 54 Id view_id, |
| 56 InterfaceRequest<ServiceProvider> services, | 55 InterfaceRequest<ServiceProvider> services, |
| 57 ServiceProviderPtr exposed_services); | 56 ServiceProviderPtr exposed_services); |
| 58 void Embed(Id view_id, ViewTreeClientPtr client); | 57 void Embed(Id view_id, ViewTreeClientPtr client); |
| 59 void EmbedAllowingReembed(mojo::URLRequestPtr request, Id view_id); | 58 void EmbedAllowingReembed(mojo::URLRequestPtr request, Id view_id); |
| 60 | 59 |
| 60 void RequestSurface(Id view_id, |
| 61 InterfaceRequest<Surface> surface, |
| 62 SurfaceClientPtr client); |
| 63 |
| 61 void set_change_acked_callback(const Callback<void(void)>& callback) { | 64 void set_change_acked_callback(const Callback<void(void)>& callback) { |
| 62 change_acked_callback_ = callback; | 65 change_acked_callback_ = callback; |
| 63 } | 66 } |
| 64 void ClearChangeAckedCallback() { change_acked_callback_.reset(); } | 67 void ClearChangeAckedCallback() { change_acked_callback_.reset(); } |
| 65 | 68 |
| 66 // Start/stop tracking views. While tracked, they can be retrieved via | 69 // Start/stop tracking views. While tracked, they can be retrieved via |
| 67 // ViewTreeConnection::GetViewById. | 70 // ViewTreeConnection::GetViewById. |
| 68 void AddView(View* view); | 71 void AddView(View* view); |
| 69 void RemoveView(Id view_id); | 72 void RemoveView(Id view_id); |
| 70 | 73 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 bool is_embed_root_; | 151 bool is_embed_root_; |
| 149 | 152 |
| 150 bool in_destructor_; | 153 bool in_destructor_; |
| 151 | 154 |
| 152 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewTreeClientImpl); | 155 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewTreeClientImpl); |
| 153 }; | 156 }; |
| 154 | 157 |
| 155 } // namespace mojo | 158 } // namespace mojo |
| 156 | 159 |
| 157 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ | 160 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_TREE_CLIENT_IMPL_H_ |
| OLD | NEW |