| 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_CONNECTION_MANAGER_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_CONNECTION_MANAGER_H_ |
| 6 #define MOJO_SERVICES_VIEW_MANAGER_CONNECTION_MANAGER_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_CONNECTION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 const ViewManagerServiceImpl* GetConnectionWithRoot(const ViewId& id) const; | 118 const ViewManagerServiceImpl* GetConnectionWithRoot(const ViewId& id) const; |
| 119 | 119 |
| 120 void DispatchViewInputEventToWindowManager(EventPtr event); | 120 void DispatchViewInputEventToWindowManager(EventPtr event); |
| 121 | 121 |
| 122 // These functions trivially delegate to all ViewManagerServiceImpls, which in | 122 // These functions trivially delegate to all ViewManagerServiceImpls, which in |
| 123 // term notify their clients. | 123 // term notify their clients. |
| 124 void ProcessViewDestroyed(ServerView* view); | 124 void ProcessViewDestroyed(ServerView* view); |
| 125 void ProcessViewBoundsChanged(const ServerView* view, | 125 void ProcessViewBoundsChanged(const ServerView* view, |
| 126 const gfx::Rect& old_bounds, | 126 const gfx::Rect& old_bounds, |
| 127 const gfx::Rect& new_bounds); | 127 const gfx::Rect& new_bounds); |
| 128 void ProcessWillChangeViewHierarchy(const ServerView* view, |
| 129 const ServerView* new_parent, |
| 130 const ServerView* old_parent); |
| 128 void ProcessViewHierarchyChanged(const ServerView* view, | 131 void ProcessViewHierarchyChanged(const ServerView* view, |
| 129 const ServerView* new_parent, | 132 const ServerView* new_parent, |
| 130 const ServerView* old_parent); | 133 const ServerView* old_parent); |
| 131 void ProcessViewReorder(const ServerView* view, | 134 void ProcessViewReorder(const ServerView* view, |
| 132 const ServerView* relative_view, | 135 const ServerView* relative_view, |
| 133 const OrderDirection direction); | 136 const OrderDirection direction); |
| 134 void ProcessViewDeleted(const ViewId& view); | 137 void ProcessViewDeleted(const ViewId& view); |
| 135 | 138 |
| 136 private: | 139 private: |
| 137 // Used to setup any static state needed by ConnectionManager. | 140 // Used to setup any static state needed by ConnectionManager. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 160 | 163 |
| 161 // Implementation of the two embed variants. | 164 // Implementation of the two embed variants. |
| 162 ViewManagerServiceImpl* EmbedImpl( | 165 ViewManagerServiceImpl* EmbedImpl( |
| 163 ConnectionSpecificId creator_id, | 166 ConnectionSpecificId creator_id, |
| 164 const String& url, | 167 const String& url, |
| 165 const ViewId& root_id, | 168 const ViewId& root_id, |
| 166 InterfaceRequest<ServiceProvider> service_provider); | 169 InterfaceRequest<ServiceProvider> service_provider); |
| 167 | 170 |
| 168 // Overridden from ServerViewDelegate: | 171 // Overridden from ServerViewDelegate: |
| 169 virtual void OnViewDestroyed(const ServerView* view) OVERRIDE; | 172 virtual void OnViewDestroyed(const ServerView* view) OVERRIDE; |
| 173 virtual void OnWillChangeViewHierarchy(const ServerView* view, |
| 174 const ServerView* new_parent, |
| 175 const ServerView* old_parent) OVERRIDE; |
| 170 virtual void OnViewHierarchyChanged(const ServerView* view, | 176 virtual void OnViewHierarchyChanged(const ServerView* view, |
| 171 const ServerView* new_parent, | 177 const ServerView* new_parent, |
| 172 const ServerView* old_parent) OVERRIDE; | 178 const ServerView* old_parent) OVERRIDE; |
| 173 virtual void OnViewBoundsChanged(const ServerView* view, | 179 virtual void OnViewBoundsChanged(const ServerView* view, |
| 174 const gfx::Rect& old_bounds, | 180 const gfx::Rect& old_bounds, |
| 175 const gfx::Rect& new_bounds) OVERRIDE; | 181 const gfx::Rect& new_bounds) OVERRIDE; |
| 176 virtual void OnViewBitmapChanged(const ServerView* view) OVERRIDE; | 182 virtual void OnViewBitmapChanged(const ServerView* view) OVERRIDE; |
| 183 virtual void OnWillChangeViewVisibility(const ServerView* view) OVERRIDE; |
| 177 | 184 |
| 178 Context context_; | 185 Context context_; |
| 179 | 186 |
| 180 ApplicationConnection* app_connection_; | 187 ApplicationConnection* app_connection_; |
| 181 | 188 |
| 182 // ID to use for next ViewManagerServiceImpl. | 189 // ID to use for next ViewManagerServiceImpl. |
| 183 ConnectionSpecificId next_connection_id_; | 190 ConnectionSpecificId next_connection_id_; |
| 184 | 191 |
| 185 // Set of ViewManagerServiceImpls. | 192 // Set of ViewManagerServiceImpls. |
| 186 ConnectionMap connection_map_; | 193 ConnectionMap connection_map_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 197 // (it's created on the stack by ViewManagerServiceImpl). | 204 // (it's created on the stack by ViewManagerServiceImpl). |
| 198 ScopedChange* current_change_; | 205 ScopedChange* current_change_; |
| 199 | 206 |
| 200 DISALLOW_COPY_AND_ASSIGN(ConnectionManager); | 207 DISALLOW_COPY_AND_ASSIGN(ConnectionManager); |
| 201 }; | 208 }; |
| 202 | 209 |
| 203 } // namespace service | 210 } // namespace service |
| 204 } // namespace mojo | 211 } // namespace mojo |
| 205 | 212 |
| 206 #endif // MOJO_SERVICES_VIEW_MANAGER_CONNECTION_MANAGER_H_ | 213 #endif // MOJO_SERVICES_VIEW_MANAGER_CONNECTION_MANAGER_H_ |
| OLD | NEW |