| 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_CONNECTION_MANAGER_H_ | 5 #ifndef COMPONENTS_VIEW_MANAGER_CONNECTION_MANAGER_H_ |
| 6 #define COMPONENTS_VIEW_MANAGER_CONNECTION_MANAGER_H_ | 6 #define COMPONENTS_VIEW_MANAGER_CONNECTION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
| 14 #include "components/view_manager/animation_runner.h" | 14 #include "components/view_manager/animation_runner.h" |
| 15 #include "components/view_manager/event_dispatcher.h" | 15 #include "components/view_manager/event_dispatcher.h" |
| 16 #include "components/view_manager/focus_controller_delegate.h" | 16 #include "components/view_manager/focus_controller_delegate.h" |
| 17 #include "components/view_manager/ids.h" | 17 #include "components/view_manager/ids.h" |
| 18 #include "components/view_manager/public/interfaces/native_viewport.mojom.h" |
| 18 #include "components/view_manager/public/interfaces/view_manager.mojom.h" | 19 #include "components/view_manager/public/interfaces/view_manager.mojom.h" |
| 19 #include "components/view_manager/public/interfaces/view_manager_root.mojom.h" | 20 #include "components/view_manager/public/interfaces/view_manager_root.mojom.h" |
| 20 #include "components/view_manager/server_view_delegate.h" | 21 #include "components/view_manager/server_view_delegate.h" |
| 21 #include "components/view_manager/server_view_observer.h" | 22 #include "components/view_manager/server_view_observer.h" |
| 22 #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h" | 23 #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h" |
| 23 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" | 24 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" |
| 24 | 25 |
| 25 namespace view_manager { | 26 namespace view_manager { |
| 26 | 27 |
| 27 class ClientConnection; | 28 class ClientConnection; |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // provided to the initial connection (the WindowManager). | 246 // provided to the initial connection (the WindowManager). |
| 246 // NOTE: |window_manager_client_connection_| is also in |connection_map_|. | 247 // NOTE: |window_manager_client_connection_| is also in |connection_map_|. |
| 247 ClientConnection* window_manager_client_connection_; | 248 ClientConnection* window_manager_client_connection_; |
| 248 | 249 |
| 249 // ID to use for next ViewManagerServiceImpl. | 250 // ID to use for next ViewManagerServiceImpl. |
| 250 mojo::ConnectionSpecificId next_connection_id_; | 251 mojo::ConnectionSpecificId next_connection_id_; |
| 251 | 252 |
| 252 // Set of ViewManagerServiceImpls. | 253 // Set of ViewManagerServiceImpls. |
| 253 ConnectionMap connection_map_; | 254 ConnectionMap connection_map_; |
| 254 | 255 |
| 255 // DisplayManager holds a raw pointer to EventDispatcher and so it must be | |
| 256 // destroyed after DisplayManager (and thus created before). | |
| 257 EventDispatcher event_dispatcher_; | |
| 258 | |
| 259 scoped_ptr<DisplayManager> display_manager_; | 256 scoped_ptr<DisplayManager> display_manager_; |
| 260 | 257 |
| 261 scoped_ptr<ServerView> root_; | 258 scoped_ptr<ServerView> root_; |
| 262 | 259 |
| 263 // If non-null we're processing a change. The ScopedChange is not owned by us | 260 // If non-null we're processing a change. The ScopedChange is not owned by us |
| 264 // (it's created on the stack by ViewManagerServiceImpl). | 261 // (it's created on the stack by ViewManagerServiceImpl). |
| 265 ScopedChange* current_change_; | 262 ScopedChange* current_change_; |
| 266 | 263 |
| 267 bool in_destructor_; | 264 bool in_destructor_; |
| 268 | 265 |
| 269 // TODO(sky): nuke! Just a proof of concept until get real animation api. | 266 // TODO(sky): nuke! Just a proof of concept until get real animation api. |
| 270 base::RepeatingTimer<ConnectionManager> animation_timer_; | 267 base::RepeatingTimer<ConnectionManager> animation_timer_; |
| 271 | 268 |
| 272 AnimationRunner animation_runner_; | 269 AnimationRunner animation_runner_; |
| 273 | 270 |
| 271 EventDispatcher event_dispatcher_; |
| 272 |
| 273 mojo::Binding<mojo::NativeViewportEventDispatcher> event_dispatcher_binding_; |
| 274 |
| 274 scoped_ptr<FocusController> focus_controller_; | 275 scoped_ptr<FocusController> focus_controller_; |
| 275 | 276 |
| 276 mojo::ViewManagerRootClientPtr view_manager_root_client_; | 277 mojo::ViewManagerRootClientPtr view_manager_root_client_; |
| 277 | 278 |
| 278 DISALLOW_COPY_AND_ASSIGN(ConnectionManager); | 279 DISALLOW_COPY_AND_ASSIGN(ConnectionManager); |
| 279 }; | 280 }; |
| 280 | 281 |
| 281 } // namespace view_manager | 282 } // namespace view_manager |
| 282 | 283 |
| 283 #endif // COMPONENTS_VIEW_MANAGER_CONNECTION_MANAGER_H_ | 284 #endif // COMPONENTS_VIEW_MANAGER_CONNECTION_MANAGER_H_ |
| OLD | NEW |