Chromium Code Reviews| 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 "components/arc/arc_bridge_host_impl.h" | 5 #include "components/arc/arc_bridge_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 OnInstanceReady(ArcBridgeService::Get()->enterprise_reporting(), | 121 OnInstanceReady(ArcBridgeService::Get()->enterprise_reporting(), |
| 122 std::move(enterprise_reporting_ptr)); | 122 std::move(enterprise_reporting_ptr)); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void ArcBridgeHostImpl::OnFileSystemInstanceReady( | 125 void ArcBridgeHostImpl::OnFileSystemInstanceReady( |
| 126 mojom::FileSystemInstancePtr file_system_ptr) { | 126 mojom::FileSystemInstancePtr file_system_ptr) { |
| 127 OnInstanceReady(ArcBridgeService::Get()->file_system(), | 127 OnInstanceReady(ArcBridgeService::Get()->file_system(), |
| 128 std::move(file_system_ptr)); | 128 std::move(file_system_ptr)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void ArcBridgeHostImpl::OnFocusHighlightInstanceReady( | |
| 132 mojom::FocusHighlightInstancePtr focus_highlight_ptr) { | |
| 133 OnInstanceReady(ArcBridgeService::Get()->focus_highlight(), | |
|
hidehiko
2016/12/08 14:54:59
I landed a CL to remove ArcBridgeService::Get() fr
yawano
2017/01/11 10:31:33
Done.
| |
| 134 std::move(focus_highlight_ptr)); | |
| 135 } | |
| 136 | |
| 131 void ArcBridgeHostImpl::OnImeInstanceReady(mojom::ImeInstancePtr ime_ptr) { | 137 void ArcBridgeHostImpl::OnImeInstanceReady(mojom::ImeInstancePtr ime_ptr) { |
| 132 OnInstanceReady(ArcBridgeService::Get()->ime(), std::move(ime_ptr)); | 138 OnInstanceReady(ArcBridgeService::Get()->ime(), std::move(ime_ptr)); |
| 133 } | 139 } |
| 134 | 140 |
| 135 void ArcBridgeHostImpl::OnIntentHelperInstanceReady( | 141 void ArcBridgeHostImpl::OnIntentHelperInstanceReady( |
| 136 mojom::IntentHelperInstancePtr intent_helper_ptr) { | 142 mojom::IntentHelperInstancePtr intent_helper_ptr) { |
| 137 OnInstanceReady(ArcBridgeService::Get()->intent_helper(), | 143 OnInstanceReady(ArcBridgeService::Get()->intent_helper(), |
| 138 std::move(intent_helper_ptr)); | 144 std::move(intent_helper_ptr)); |
| 139 } | 145 } |
| 140 | 146 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 243 void ArcBridgeHostImpl::OnChannelClosed(MojoChannel* channel) { | 249 void ArcBridgeHostImpl::OnChannelClosed(MojoChannel* channel) { |
| 244 DCHECK(thread_checker_.CalledOnValidThread()); | 250 DCHECK(thread_checker_.CalledOnValidThread()); |
| 245 mojo_channels_.erase( | 251 mojo_channels_.erase( |
| 246 std::find_if(mojo_channels_.begin(), mojo_channels_.end(), | 252 std::find_if(mojo_channels_.begin(), mojo_channels_.end(), |
| 247 [channel](std::unique_ptr<MojoChannel>& ptr) { | 253 [channel](std::unique_ptr<MojoChannel>& ptr) { |
| 248 return ptr.get() == channel; | 254 return ptr.get() == channel; |
| 249 })); | 255 })); |
| 250 } | 256 } |
| 251 | 257 |
| 252 } // namespace arc | 258 } // namespace arc |
| OLD | NEW |