| 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_MANAGER_CLIENT_IMPL_H_ | 5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ |
| 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_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_manager.h" | 10 #include "components/view_manager/public/cpp/view_manager.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 void SetImeVisibility(Id view_id, bool visible, TextInputStatePtr state); | 55 void SetImeVisibility(Id view_id, bool visible, TextInputStatePtr state); |
| 56 | 56 |
| 57 void Embed(const String& url, Id view_id); | 57 void Embed(const String& url, Id view_id); |
| 58 void Embed(mojo::URLRequestPtr request, | 58 void Embed(mojo::URLRequestPtr request, |
| 59 Id view_id, | 59 Id view_id, |
| 60 InterfaceRequest<ServiceProvider> services, | 60 InterfaceRequest<ServiceProvider> services, |
| 61 ServiceProviderPtr exposed_services); | 61 ServiceProviderPtr exposed_services); |
| 62 void Embed(Id view_id, ViewManagerClientPtr client); | 62 void Embed(Id view_id, ViewManagerClientPtr client); |
| 63 void EmbedAllowingReembed(mojo::URLRequestPtr request, Id view_id); | 63 void EmbedAllowingReembed(mojo::URLRequestPtr request, Id view_id); |
| 64 | 64 |
| 65 void RequestCompositorFrameReceiver( |
| 66 Id view_id, |
| 67 InterfaceRequest<CompositorFrameReceiver> receiver); |
| 68 |
| 65 void set_change_acked_callback(const Callback<void(void)>& callback) { | 69 void set_change_acked_callback(const Callback<void(void)>& callback) { |
| 66 change_acked_callback_ = callback; | 70 change_acked_callback_ = callback; |
| 67 } | 71 } |
| 68 void ClearChangeAckedCallback() { change_acked_callback_.reset(); } | 72 void ClearChangeAckedCallback() { change_acked_callback_.reset(); } |
| 69 | 73 |
| 70 // Start/stop tracking views. While tracked, they can be retrieved via | 74 // Start/stop tracking views. While tracked, they can be retrieved via |
| 71 // ViewManager::GetViewById. | 75 // ViewManager::GetViewById. |
| 72 void AddView(View* view); | 76 void AddView(View* view); |
| 73 void RemoveView(Id view_id); | 77 void RemoveView(Id view_id); |
| 74 | 78 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 95 void OnEmbed(ConnectionSpecificId connection_id, | 99 void OnEmbed(ConnectionSpecificId connection_id, |
| 96 ViewDataPtr root, | 100 ViewDataPtr root, |
| 97 ViewManagerServicePtr view_manager_service, | 101 ViewManagerServicePtr view_manager_service, |
| 98 Id focused_view_id) override; | 102 Id focused_view_id) override; |
| 99 void OnEmbedForDescendant( | 103 void OnEmbedForDescendant( |
| 100 Id view, | 104 Id view, |
| 101 mojo::URLRequestPtr request, | 105 mojo::URLRequestPtr request, |
| 102 const OnEmbedForDescendantCallback& callback) override; | 106 const OnEmbedForDescendantCallback& callback) override; |
| 103 void OnEmbeddedAppDisconnected(Id view_id) override; | 107 void OnEmbeddedAppDisconnected(Id view_id) override; |
| 104 void OnUnembed() override; | 108 void OnUnembed() override; |
| 109 void OnResourcesReturned( |
| 110 mojo::Array<mojo::ReturnedResourcePtr> resources) override; |
| 105 void OnViewBoundsChanged(Id view_id, | 111 void OnViewBoundsChanged(Id view_id, |
| 106 RectPtr old_bounds, | 112 RectPtr old_bounds, |
| 107 RectPtr new_bounds) override; | 113 RectPtr new_bounds) override; |
| 108 void OnViewViewportMetricsChanged(ViewportMetricsPtr old_metrics, | 114 void OnViewViewportMetricsChanged(ViewportMetricsPtr old_metrics, |
| 109 ViewportMetricsPtr new_metrics) override; | 115 ViewportMetricsPtr new_metrics) override; |
| 110 void OnViewHierarchyChanged(Id view_id, | 116 void OnViewHierarchyChanged(Id view_id, |
| 111 Id new_parent_id, | 117 Id new_parent_id, |
| 112 Id old_parent_id, | 118 Id old_parent_id, |
| 113 Array<ViewDataPtr> views) override; | 119 Array<ViewDataPtr> views) override; |
| 114 void OnViewReordered(Id view_id, | 120 void OnViewReordered(Id view_id, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 bool is_embed_root_; | 158 bool is_embed_root_; |
| 153 | 159 |
| 154 bool in_destructor_; | 160 bool in_destructor_; |
| 155 | 161 |
| 156 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); | 162 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); |
| 157 }; | 163 }; |
| 158 | 164 |
| 159 } // namespace mojo | 165 } // namespace mojo |
| 160 | 166 |
| 161 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 167 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ |
| OLD | NEW |