| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SERVICES_UI_VIEW_MANAGER_VIEW_REGISTRY_H_ | 5 #ifndef SERVICES_UI_VIEW_MANAGER_VIEW_REGISTRY_H_ |
| 6 #define SERVICES_UI_VIEW_MANAGER_VIEW_REGISTRY_H_ | 6 #define SERVICES_UI_VIEW_MANAGER_VIEW_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, | 47 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, |
| 48 mojo::ui::ViewListenerPtr view_listener, | 48 mojo::ui::ViewListenerPtr view_listener, |
| 49 const mojo::String& label); | 49 const mojo::String& label); |
| 50 | 50 |
| 51 // Creates a view tree. | 51 // Creates a view tree. |
| 52 void CreateViewTree( | 52 void CreateViewTree( |
| 53 mojo::InterfaceRequest<mojo::ui::ViewTree> view_tree_request, | 53 mojo::InterfaceRequest<mojo::ui::ViewTree> view_tree_request, |
| 54 mojo::ui::ViewTreeListenerPtr view_tree_listener, | 54 mojo::ui::ViewTreeListenerPtr view_tree_listener, |
| 55 const mojo::String& label); | 55 const mojo::String& label); |
| 56 | 56 |
| 57 void RegisterViewAssociate( |
| 58 mojo::ui::ViewInspector* view_inspector, |
| 59 mojo::ui::ViewAssociatePtr view_associate, |
| 60 const std::string& url, |
| 61 const AssociateConnectionErrorCallback& connection_error_callback); |
| 62 |
| 57 // VIEW STUB REQUESTS | 63 // VIEW STUB REQUESTS |
| 58 | 64 |
| 59 void OnViewResolved(ViewStub* view_stub, mojo::ui::ViewTokenPtr view_token); | 65 void OnViewResolved(ViewStub* view_stub, mojo::ui::ViewTokenPtr view_token); |
| 60 | 66 |
| 61 // VIEW REQUESTS | 67 // VIEW REQUESTS |
| 62 | 68 |
| 63 // Creates a scene for the view, replacing its current scene. | 69 // Creates a scene for the view, replacing its current scene. |
| 64 // Destroys |view_state| if an error occurs. | 70 // Destroys |view_state| if an error occurs. |
| 65 void CreateScene(ViewState* view_state, | 71 void CreateScene(ViewState* view_state, |
| 66 mojo::InterfaceRequest<mojo::gfx::composition::Scene> scene); | 72 mojo::InterfaceRequest<mojo::gfx::composition::Scene> scene); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 std::unordered_map<uint32_t, ViewState*> views_by_token_; | 212 std::unordered_map<uint32_t, ViewState*> views_by_token_; |
| 207 std::unordered_map<uint32_t, ViewState*> views_by_scene_token_; | 213 std::unordered_map<uint32_t, ViewState*> views_by_scene_token_; |
| 208 std::unordered_map<uint32_t, ViewTreeState*> view_trees_by_token_; | 214 std::unordered_map<uint32_t, ViewTreeState*> view_trees_by_token_; |
| 209 | 215 |
| 210 DISALLOW_COPY_AND_ASSIGN(ViewRegistry); | 216 DISALLOW_COPY_AND_ASSIGN(ViewRegistry); |
| 211 }; | 217 }; |
| 212 | 218 |
| 213 } // namespace view_manager | 219 } // namespace view_manager |
| 214 | 220 |
| 215 #endif // SERVICES_UI_VIEW_MANAGER_VIEW_REGISTRY_H_ | 221 #endif // SERVICES_UI_VIEW_MANAGER_VIEW_REGISTRY_H_ |
| OLD | NEW |