Dominic Farolino | 132f839 | 2023-10-20 14:13:56 | [diff] [blame] | 1 | // Copyright 2023 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "codelabs/mojo_examples/mojo_impls.h" |
| 6 | |
| 7 | #include "base/logging.h" |
| 8 | |
| 9 | ObjectAImpl::ObjectAImpl() = default; |
| 10 | ObjectAImpl::~ObjectAImpl() = default; |
| 11 | |
| 12 | void ObjectAImpl::BindToFrozenTaskRunner( |
| 13 | mojo::PendingAssociatedReceiver<codelabs::mojom::ObjectA> pending_receiver, |
| 14 | scoped_refptr<base::SingleThreadTaskRunner> freezable_tq_runner) { |
| 15 | receiver_.Bind(std::move(pending_receiver), std::move(freezable_tq_runner)); |
| 16 | } |
| 17 | |
| 18 | void ObjectAImpl::DoA() { |
| 19 | LOG(INFO) << "DoA IPC is being processed!"; |
| 20 | } |
| 21 | |
| 22 | ObjectBImpl::ObjectBImpl() = default; |
| 23 | ObjectBImpl::~ObjectBImpl() = default; |
| 24 | |
| 25 | void ObjectBImpl::Bind(mojo::PendingAssociatedReceiver<codelabs::mojom::ObjectB> |
| 26 | pending_receiver) { |
| 27 | receiver_.Bind(std::move(pending_receiver)); |
| 28 | } |
| 29 | |
| 30 | void ObjectBImpl::DoB() { |
| 31 | LOG(INFO) << "DoB IPC is being processed!"; |
| 32 | } |