| 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 "cc/test/remote_proto_channel_bridge.h" | 5 #include "cc/test/remote_proto_channel_bridge.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 case proto::CompositorMessageToImpl::UNKNOWN: | 50 case proto::CompositorMessageToImpl::UNKNOWN: |
| 51 return; | 51 return; |
| 52 case proto::CompositorMessageToImpl::INITIALIZE_IMPL: | 52 case proto::CompositorMessageToImpl::INITIALIZE_IMPL: |
| 53 test_hooks_->CreateRemoteClientHost(to_impl_proto); | 53 test_hooks_->CreateRemoteClientHost(to_impl_proto); |
| 54 return; | 54 return; |
| 55 case proto::CompositorMessageToImpl::CLOSE_IMPL: | 55 case proto::CompositorMessageToImpl::CLOSE_IMPL: |
| 56 test_hooks_->DestroyRemoteClientHost(); | 56 test_hooks_->DestroyRemoteClientHost(); |
| 57 return; | 57 return; |
| 58 default: | 58 default: |
| 59 bridge_->channel_impl.OnProtoReceived( | 59 bridge_->channel_impl.OnProtoReceived( |
| 60 base::WrapUnique(new proto::CompositorMessage(proto))); | 60 base::MakeUnique<proto::CompositorMessage>(proto)); |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 | 63 |
| 64 FakeRemoteProtoChannelImpl::FakeRemoteProtoChannelImpl( | 64 FakeRemoteProtoChannelImpl::FakeRemoteProtoChannelImpl( |
| 65 RemoteProtoChannelBridge* bridge) | 65 RemoteProtoChannelBridge* bridge) |
| 66 : FakeRemoteProtoChannel(bridge) {} | 66 : FakeRemoteProtoChannel(bridge) {} |
| 67 | 67 |
| 68 void FakeRemoteProtoChannelImpl::SendCompositorProto( | 68 void FakeRemoteProtoChannelImpl::SendCompositorProto( |
| 69 const proto::CompositorMessage& proto) { | 69 const proto::CompositorMessage& proto) { |
| 70 bridge_->channel_main.OnProtoReceived( | 70 bridge_->channel_main.OnProtoReceived( |
| 71 base::WrapUnique(new proto::CompositorMessage(proto))); | 71 base::MakeUnique<proto::CompositorMessage>(proto)); |
| 72 } | 72 } |
| 73 | 73 |
| 74 RemoteProtoChannelBridge::RemoteProtoChannelBridge(TestHooks* test_hooks) | 74 RemoteProtoChannelBridge::RemoteProtoChannelBridge(TestHooks* test_hooks) |
| 75 : channel_main(this, test_hooks), channel_impl(this) {} | 75 : channel_main(this, test_hooks), channel_impl(this) {} |
| 76 | 76 |
| 77 RemoteProtoChannelBridge::~RemoteProtoChannelBridge() {} | 77 RemoteProtoChannelBridge::~RemoteProtoChannelBridge() {} |
| 78 | 78 |
| 79 } // namespace cc | 79 } // namespace cc |
| OLD | NEW |