| 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 #include "mojo/services/view_manager/root_node_manager.h" | 5 #include "mojo/services/view_manager/root_node_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "mojo/services/view_manager/view_manager_connection.h" | 8 #include "mojo/services/view_manager/view_manager_connection.h" |
| 9 #include "ui/aura/env.h" | 9 #include "ui/aura/env.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 RootNodeManager::Context::Context() { | 29 RootNodeManager::Context::Context() { |
| 30 // Pass in false as native viewport creates the PlatformEventSource. | 30 // Pass in false as native viewport creates the PlatformEventSource. |
| 31 aura::Env::CreateInstance(false); | 31 aura::Env::CreateInstance(false); |
| 32 } | 32 } |
| 33 | 33 |
| 34 RootNodeManager::Context::~Context() { | 34 RootNodeManager::Context::~Context() { |
| 35 } | 35 } |
| 36 | 36 |
| 37 RootNodeManager::RootNodeManager(Shell* shell) | 37 RootNodeManager::RootNodeManager(ServiceProvider* service_provider) |
| 38 : next_connection_id_(1), | 38 : next_connection_id_(1), |
| 39 next_server_change_id_(1), | 39 next_server_change_id_(1), |
| 40 change_source_(kRootConnection), | 40 change_source_(kRootConnection), |
| 41 is_processing_delete_node_(false), | 41 is_processing_delete_node_(false), |
| 42 root_view_manager_(shell, this), | 42 root_view_manager_(service_provider, this), |
| 43 root_(this, RootNodeId()) { | 43 root_(this, RootNodeId()) { |
| 44 } | 44 } |
| 45 | 45 |
| 46 RootNodeManager::~RootNodeManager() { | 46 RootNodeManager::~RootNodeManager() { |
| 47 // All the connections should have been destroyed. | 47 // All the connections should have been destroyed. |
| 48 DCHECK(connection_map_.empty()); | 48 DCHECK(connection_map_.empty()); |
| 49 } | 49 } |
| 50 | 50 |
| 51 TransportConnectionId RootNodeManager::GetAndAdvanceNextConnectionId() { | 51 TransportConnectionId RootNodeManager::GetAndAdvanceNextConnectionId() { |
| 52 const TransportConnectionId id = next_connection_id_++; | 52 const TransportConnectionId id = next_connection_id_++; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 void RootNodeManager::OnNodeViewReplaced(const Node* node, | 154 void RootNodeManager::OnNodeViewReplaced(const Node* node, |
| 155 const View* new_view, | 155 const View* new_view, |
| 156 const View* old_view) { | 156 const View* old_view) { |
| 157 ProcessNodeViewReplaced(node, new_view, old_view); | 157 ProcessNodeViewReplaced(node, new_view, old_view); |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace service | 160 } // namespace service |
| 161 } // namespace view_manager | 161 } // namespace view_manager |
| 162 } // namespace mojo | 162 } // namespace mojo |
| OLD | NEW |