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/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 #include "mojo/public/cpp/bindings/strong_binding.h" | 10 #include "mojo/public/cpp/bindings/strong_binding.h" |
11 #include "services/navigation/view_impl.h" | 11 #include "services/navigation/view_impl.h" |
12 #include "services/shell/public/cpp/connector.h" | 12 #include "services/service_manager/public/cpp/connector.h" |
13 | 13 |
14 namespace navigation { | 14 namespace navigation { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 void CreateViewOnViewTaskRunner( | 18 void CreateViewOnViewTaskRunner( |
19 std::unique_ptr<shell::Connector> connector, | 19 std::unique_ptr<shell::Connector> connector, |
20 const std::string& client_user_id, | 20 const std::string& client_user_id, |
21 mojom::ViewClientPtr client, | 21 mojom::ViewClientPtr client, |
22 mojom::ViewRequest request, | 22 mojom::ViewRequest request, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 void Navigation::CreateViewFactory(mojom::ViewFactoryRequest request) { | 69 void Navigation::CreateViewFactory(mojom::ViewFactoryRequest request) { |
70 bindings_.AddBinding(this, std::move(request)); | 70 bindings_.AddBinding(this, std::move(request)); |
71 refs_.insert(ref_factory_.CreateRef()); | 71 refs_.insert(ref_factory_.CreateRef()); |
72 } | 72 } |
73 | 73 |
74 void Navigation::ViewFactoryLost() { | 74 void Navigation::ViewFactoryLost() { |
75 refs_.erase(refs_.begin()); | 75 refs_.erase(refs_.begin()); |
76 } | 76 } |
77 | 77 |
78 } // navigation | 78 } // navigation |
OLD | NEW |