| 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_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ |
| 6 #define MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 void SetSurfaceId(Id view_id, SurfaceIdPtr surface_id); | 56 void SetSurfaceId(Id view_id, SurfaceIdPtr surface_id); |
| 57 void SetFocus(Id view_id); | 57 void SetFocus(Id view_id); |
| 58 void SetVisible(Id view_id, bool visible); | 58 void SetVisible(Id view_id, bool visible); |
| 59 void SetProperty(Id view_id, | 59 void SetProperty(Id view_id, |
| 60 const std::string& name, | 60 const std::string& name, |
| 61 const std::vector<uint8_t>& data); | 61 const std::vector<uint8_t>& data); |
| 62 | 62 |
| 63 void Embed(const String& url, Id view_id); | 63 void Embed(const String& url, Id view_id); |
| 64 void Embed(const String& url, | 64 void Embed(const String& url, |
| 65 Id view_id, | 65 Id view_id, |
| 66 InterfaceRequest<ServiceProvider> service_provider); | 66 InterfaceRequest<ServiceProvider> parent_services, |
| 67 ServiceProviderPtr parent_exposed_services); |
| 67 | 68 |
| 68 void set_change_acked_callback(const base::Callback<void(void)>& callback) { | 69 void set_change_acked_callback(const base::Callback<void(void)>& callback) { |
| 69 change_acked_callback_ = callback; | 70 change_acked_callback_ = callback; |
| 70 } | 71 } |
| 71 void ClearChangeAckedCallback() { | 72 void ClearChangeAckedCallback() { |
| 72 change_acked_callback_ = base::Callback<void(void)>(); | 73 change_acked_callback_ = base::Callback<void(void)>(); |
| 73 } | 74 } |
| 74 | 75 |
| 75 // Start/stop tracking views. While tracked, they can be retrieved via | 76 // Start/stop tracking views. While tracked, they can be retrieved via |
| 76 // ViewManager::GetViewById. | 77 // ViewManager::GetViewById. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 89 View* GetRoot() override; | 90 View* GetRoot() override; |
| 90 View* GetViewById(Id id) override; | 91 View* GetViewById(Id id) override; |
| 91 View* GetFocusedView() override; | 92 View* GetFocusedView() override; |
| 92 View* CreateView() override; | 93 View* CreateView() override; |
| 93 | 94 |
| 94 // Overridden from ViewManagerClient: | 95 // Overridden from ViewManagerClient: |
| 95 void OnEmbed(ConnectionSpecificId connection_id, | 96 void OnEmbed(ConnectionSpecificId connection_id, |
| 96 const String& creator_url, | 97 const String& creator_url, |
| 97 ViewDataPtr root, | 98 ViewDataPtr root, |
| 98 InterfaceRequest<ServiceProvider> parent_services, | 99 InterfaceRequest<ServiceProvider> parent_services, |
| 100 ServiceProviderPtr parent_exposed_services, |
| 99 ScopedMessagePipeHandle window_manager_pipe) override; | 101 ScopedMessagePipeHandle window_manager_pipe) override; |
| 100 void OnEmbeddedAppDisconnected(Id view_id) override; | 102 void OnEmbeddedAppDisconnected(Id view_id) override; |
| 101 void OnViewBoundsChanged(Id view_id, | 103 void OnViewBoundsChanged(Id view_id, |
| 102 RectPtr old_bounds, | 104 RectPtr old_bounds, |
| 103 RectPtr new_bounds) override; | 105 RectPtr new_bounds) override; |
| 104 void OnViewHierarchyChanged(Id view_id, | 106 void OnViewHierarchyChanged(Id view_id, |
| 105 Id new_parent_id, | 107 Id new_parent_id, |
| 106 Id old_parent_id, | 108 Id old_parent_id, |
| 107 Array<ViewDataPtr> views) override; | 109 Array<ViewDataPtr> views) override; |
| 108 void OnViewReordered(Id view_id, | 110 void OnViewReordered(Id view_id, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 Binding<ViewManagerClient> binding_; | 165 Binding<ViewManagerClient> binding_; |
| 164 ViewManagerService* service_; | 166 ViewManagerService* service_; |
| 165 const bool delete_on_error_; | 167 const bool delete_on_error_; |
| 166 | 168 |
| 167 DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); | 169 DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); |
| 168 }; | 170 }; |
| 169 | 171 |
| 170 } // namespace mojo | 172 } // namespace mojo |
| 171 | 173 |
| 172 #endif // MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 174 #endif // MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ |
| OLD | NEW |