| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 } | 154 } |
| 155 | 155 |
| 156 // Implementation of the two embed variants. | 156 // Implementation of the two embed variants. |
| 157 ViewManagerServiceImpl* EmbedImpl( | 157 ViewManagerServiceImpl* EmbedImpl( |
| 158 ConnectionSpecificId creator_id, | 158 ConnectionSpecificId creator_id, |
| 159 const String& url, | 159 const String& url, |
| 160 const ViewId& root_id, | 160 const ViewId& root_id, |
| 161 InterfaceRequest<ServiceProvider> service_provider); | 161 InterfaceRequest<ServiceProvider> service_provider); |
| 162 | 162 |
| 163 // Overridden from ServerViewDelegate: | 163 // Overridden from ServerViewDelegate: |
| 164 virtual void OnViewDestroyed(const ServerView* view) OVERRIDE; | 164 virtual void OnViewDestroyed(const ServerView* view) override; |
| 165 virtual void OnWillChangeViewHierarchy(const ServerView* view, | 165 virtual void OnWillChangeViewHierarchy(const ServerView* view, |
| 166 const ServerView* new_parent, | 166 const ServerView* new_parent, |
| 167 const ServerView* old_parent) OVERRIDE; | 167 const ServerView* old_parent) override; |
| 168 virtual void OnViewHierarchyChanged(const ServerView* view, | 168 virtual void OnViewHierarchyChanged(const ServerView* view, |
| 169 const ServerView* new_parent, | 169 const ServerView* new_parent, |
| 170 const ServerView* old_parent) OVERRIDE; | 170 const ServerView* old_parent) override; |
| 171 virtual void OnViewBoundsChanged(const ServerView* view, | 171 virtual void OnViewBoundsChanged(const ServerView* view, |
| 172 const gfx::Rect& old_bounds, | 172 const gfx::Rect& old_bounds, |
| 173 const gfx::Rect& new_bounds) OVERRIDE; | 173 const gfx::Rect& new_bounds) override; |
| 174 virtual void OnViewSurfaceIdChanged(const ServerView* view) OVERRIDE; | 174 virtual void OnViewSurfaceIdChanged(const ServerView* view) override; |
| 175 virtual void OnViewReordered(const ServerView* view, | 175 virtual void OnViewReordered(const ServerView* view, |
| 176 const ServerView* relative, | 176 const ServerView* relative, |
| 177 OrderDirection direction) OVERRIDE; | 177 OrderDirection direction) override; |
| 178 virtual void OnWillChangeViewVisibility(const ServerView* view) OVERRIDE; | 178 virtual void OnWillChangeViewVisibility(const ServerView* view) override; |
| 179 | 179 |
| 180 ApplicationConnection* app_connection_; | 180 ApplicationConnection* app_connection_; |
| 181 | 181 |
| 182 // ID to use for next ViewManagerServiceImpl. | 182 // ID to use for next ViewManagerServiceImpl. |
| 183 ConnectionSpecificId next_connection_id_; | 183 ConnectionSpecificId next_connection_id_; |
| 184 | 184 |
| 185 // Set of ViewManagerServiceImpls. | 185 // Set of ViewManagerServiceImpls. |
| 186 ConnectionMap connection_map_; | 186 ConnectionMap connection_map_; |
| 187 | 187 |
| 188 DisplayManager display_manager_; | 188 DisplayManager display_manager_; |
| 189 | 189 |
| 190 scoped_ptr<ServerView> root_; | 190 scoped_ptr<ServerView> root_; |
| 191 | 191 |
| 192 // Set of ViewManagerServiceImpls created by way of Connect(). These have to | 192 // Set of ViewManagerServiceImpls created by way of Connect(). These have to |
| 193 // be explicitly destroyed. | 193 // be explicitly destroyed. |
| 194 std::set<ViewManagerServiceImpl*> connections_created_by_connect_; | 194 std::set<ViewManagerServiceImpl*> connections_created_by_connect_; |
| 195 | 195 |
| 196 // If non-null we're processing a change. The ScopedChange is not owned by us | 196 // If non-null we're processing a change. The ScopedChange is not owned by us |
| 197 // (it's created on the stack by ViewManagerServiceImpl). | 197 // (it's created on the stack by ViewManagerServiceImpl). |
| 198 ScopedChange* current_change_; | 198 ScopedChange* current_change_; |
| 199 | 199 |
| 200 DISALLOW_COPY_AND_ASSIGN(ConnectionManager); | 200 DISALLOW_COPY_AND_ASSIGN(ConnectionManager); |
| 201 }; | 201 }; |
| 202 | 202 |
| 203 } // namespace service | 203 } // namespace service |
| 204 } // namespace mojo | 204 } // namespace mojo |
| 205 | 205 |
| 206 #endif // MOJO_SERVICES_VIEW_MANAGER_CONNECTION_MANAGER_H_ | 206 #endif // MOJO_SERVICES_VIEW_MANAGER_CONNECTION_MANAGER_H_ |
| OLD | NEW |