Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: cc/test/remote_proto_channel_bridge.cc

Issue 2494623002: cc: Remove client/engine LayerTreeHostInProcess. (Closed)
Patch Set: .. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/remote_proto_channel_bridge.h ('k') | cc/test/serialization_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/remote_proto_channel_bridge.cc
diff --git a/cc/test/remote_proto_channel_bridge.cc b/cc/test/remote_proto_channel_bridge.cc
deleted file mode 100644
index 60011e8ebc9141c08ebb7c2045e172a7515db1ef..0000000000000000000000000000000000000000
--- a/cc/test/remote_proto_channel_bridge.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/test/remote_proto_channel_bridge.h"
-
-#include <memory>
-
-#include "base/logging.h"
-#include "base/memory/ptr_util.h"
-#include "cc/proto/compositor_message.pb.h"
-
-namespace cc {
-
-FakeRemoteProtoChannel::FakeRemoteProtoChannel(RemoteProtoChannelBridge* bridge)
- : bridge_(bridge), receiver_(nullptr) {
- DCHECK(bridge_);
-}
-
-FakeRemoteProtoChannel::~FakeRemoteProtoChannel() {}
-
-void FakeRemoteProtoChannel::SetProtoReceiver(ProtoReceiver* receiver) {
- receiver_ = receiver;
-}
-
-void FakeRemoteProtoChannel::OnProtoReceived(
- std::unique_ptr<proto::CompositorMessage> proto) {
- DCHECK(receiver_);
-
- receiver_->OnProtoReceived(std::move(proto));
-}
-
-bool FakeRemoteProtoChannel::HasReceiver() const {
- return receiver_ != nullptr;
-}
-
-FakeRemoteProtoChannelMain::FakeRemoteProtoChannelMain(
- RemoteProtoChannelBridge* bridge)
- : FakeRemoteProtoChannel(bridge) {}
-
-void FakeRemoteProtoChannelMain::SendCompositorProto(
- const proto::CompositorMessage& proto) {
- DCHECK(proto.has_to_impl());
-
- // Check for CompositorMessageToImpl::InitializeImpl and CloseImpl message
- // types to create and destroy the remote client LayerTreeHost.
- proto::CompositorMessageToImpl to_impl_proto = proto.to_impl();
- switch (to_impl_proto.message_type()) {
- case proto::CompositorMessageToImpl::UNKNOWN:
- return;
- default:
- bridge_->channel_impl.OnProtoReceived(
- base::MakeUnique<proto::CompositorMessage>(proto));
- }
-}
-
-FakeRemoteProtoChannelImpl::FakeRemoteProtoChannelImpl(
- RemoteProtoChannelBridge* bridge)
- : FakeRemoteProtoChannel(bridge) {}
-
-void FakeRemoteProtoChannelImpl::SendCompositorProto(
- const proto::CompositorMessage& proto) {
- bridge_->channel_main.OnProtoReceived(
- base::MakeUnique<proto::CompositorMessage>(proto));
-}
-
-RemoteProtoChannelBridge::RemoteProtoChannelBridge()
- : channel_main(this), channel_impl(this) {}
-
-RemoteProtoChannelBridge::~RemoteProtoChannelBridge() {}
-
-} // namespace cc
« no previous file with comments | « cc/test/remote_proto_channel_bridge.h ('k') | cc/test/serialization_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698