| 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/view_manager_init_service_context.h" | 5 #include "mojo/services/view_manager/view_manager_init_service_context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "mojo/services/view_manager/root_node_manager.h" | 8 #include "mojo/services/view_manager/root_node_manager.h" |
| 9 #include "mojo/services/view_manager/view_manager_init_service_impl.h" | 9 #include "mojo/services/view_manager/view_manager_init_service_impl.h" |
| 10 | 10 |
| 11 namespace mojo { | 11 namespace mojo { |
| 12 namespace view_manager { | |
| 13 namespace service { | 12 namespace service { |
| 14 | 13 |
| 15 ViewManagerInitServiceContext::ViewManagerInitServiceContext() | 14 ViewManagerInitServiceContext::ViewManagerInitServiceContext() |
| 16 : is_tree_host_ready_(false) {} | 15 : is_tree_host_ready_(false) {} |
| 17 ViewManagerInitServiceContext::~ViewManagerInitServiceContext() {} | 16 ViewManagerInitServiceContext::~ViewManagerInitServiceContext() {} |
| 18 | 17 |
| 19 void ViewManagerInitServiceContext::AddConnection( | 18 void ViewManagerInitServiceContext::AddConnection( |
| 20 ViewManagerInitServiceImpl* connection) { | 19 ViewManagerInitServiceImpl* connection) { |
| 21 DCHECK(std::find(connections_.begin(), connections_.end(), connection) == | 20 DCHECK(std::find(connections_.begin(), connections_.end(), connection) == |
| 22 connections_.end()); | 21 connections_.end()); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 void ViewManagerInitServiceContext::OnRootViewManagerWindowTreeHostCreated() { | 57 void ViewManagerInitServiceContext::OnRootViewManagerWindowTreeHostCreated() { |
| 59 DCHECK(!is_tree_host_ready_); | 58 DCHECK(!is_tree_host_ready_); |
| 60 is_tree_host_ready_ = true; | 59 is_tree_host_ready_ = true; |
| 61 for (Connections::const_iterator it = connections_.begin(); | 60 for (Connections::const_iterator it = connections_.begin(); |
| 62 it != connections_.end(); ++it) { | 61 it != connections_.end(); ++it) { |
| 63 (*it)->OnRootViewManagerWindowTreeHostCreated(); | 62 (*it)->OnRootViewManagerWindowTreeHostCreated(); |
| 64 } | 63 } |
| 65 } | 64 } |
| 66 | 65 |
| 67 } // namespace service | 66 } // namespace service |
| 68 } // namespace view_manager | |
| 69 } // namespace mojo | 67 } // namespace mojo |
| OLD | NEW |