| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/navigation/navigation.h" | 5 #include "services/navigation/navigation.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| 11 #include "mojo/public/cpp/bindings/strong_binding.h" | 11 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 12 #include "services/navigation/view_impl.h" | 12 #include "services/navigation/view_impl.h" |
| 13 #include "services/service_manager/public/cpp/connector.h" | 13 #include "services/service_manager/public/cpp/connector.h" |
| 14 #include "services/service_manager/public/cpp/interface_registry.h" | |
| 15 #include "services/service_manager/public/cpp/service_context.h" | 14 #include "services/service_manager/public/cpp/service_context.h" |
| 16 | 15 |
| 17 namespace navigation { | 16 namespace navigation { |
| 18 | 17 |
| 19 namespace { | 18 namespace { |
| 20 | 19 |
| 21 void CreateViewOnViewTaskRunner( | 20 void CreateViewOnViewTaskRunner( |
| 22 std::unique_ptr<service_manager::Connector> connector, | 21 std::unique_ptr<service_manager::Connector> connector, |
| 23 const std::string& client_user_id, | 22 const std::string& client_user_id, |
| 24 mojom::ViewClientPtr client, | 23 mojom::ViewClientPtr client, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 mojom::ViewFactoryRequest request) { | 76 mojom::ViewFactoryRequest request) { |
| 78 bindings_.AddBinding(this, std::move(request)); | 77 bindings_.AddBinding(this, std::move(request)); |
| 79 refs_.insert(ref_factory_.CreateRef()); | 78 refs_.insert(ref_factory_.CreateRef()); |
| 80 } | 79 } |
| 81 | 80 |
| 82 void Navigation::ViewFactoryLost() { | 81 void Navigation::ViewFactoryLost() { |
| 83 refs_.erase(refs_.begin()); | 82 refs_.erase(refs_.begin()); |
| 84 } | 83 } |
| 85 | 84 |
| 86 } // navigation | 85 } // navigation |
| OLD | NEW |