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

Unified Diff: remoting/client/ios/bridge/frame_consumer_bridge.cc

Issue 2829853003: Remove crufty bridge code from old CRD iOS app. (Closed)
Patch Set: Fix remoting/display proto import issue. Created 3 years, 8 months 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
Index: remoting/client/ios/bridge/frame_consumer_bridge.cc
diff --git a/remoting/client/ios/bridge/frame_consumer_bridge.cc b/remoting/client/ios/bridge/frame_consumer_bridge.cc
deleted file mode 100644
index f1292352d32c01d549033790f6281d44365c0fc4..0000000000000000000000000000000000000000
--- a/remoting/client/ios/bridge/frame_consumer_bridge.cc
+++ /dev/null
@@ -1,56 +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 "remoting/client/ios/bridge/frame_consumer_bridge.h"
-
-#include "base/bind.h"
-#include "base/logging.h"
-#include "base/memory/ptr_util.h"
-#include "base/synchronization/waitable_event.h"
-#include "remoting/base/util.h"
-#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
-
-namespace remoting {
-
-FrameConsumerBridge::FrameConsumerBridge(ClientInstance* client_instance,
- const OnFrameCallback callback)
- : callback_(callback), runtime_(client_instance), weak_factory_(this) {}
-
-FrameConsumerBridge::~FrameConsumerBridge() {}
-
-std::unique_ptr<webrtc::DesktopFrame> FrameConsumerBridge::AllocateFrame(
- const webrtc::DesktopSize& size) {
- return base::WrapUnique(new webrtc::BasicDesktopFrame(size));
-}
-
-void FrameConsumerBridge::RenderFrame(
- std::unique_ptr<webrtc::DesktopFrame> frame) {
- DCHECK(runtime_->display_task_runner()->BelongsToCurrentThread());
- // Draw the frame
- callback_.Run(frame.get());
-}
-
-void FrameConsumerBridge::DrawFrame(std::unique_ptr<webrtc::DesktopFrame> frame,
- const base::Closure& done) {
- DCHECK(runtime_->network_task_runner()->BelongsToCurrentThread());
-
- runtime_->display_task_runner()->PostTaskAndReply(
- FROM_HERE, base::Bind(&FrameConsumerBridge::RenderFrame,
- weak_factory_.GetWeakPtr(), base::Passed(&frame)),
- base::Bind(&FrameConsumerBridge::OnFrameRendered,
- weak_factory_.GetWeakPtr(), done));
-}
-
-void FrameConsumerBridge::OnFrameRendered(const base::Closure& done) {
- DCHECK(runtime_->network_task_runner()->BelongsToCurrentThread());
-
- if (!done.is_null())
- done.Run();
-}
-
-FrameConsumerBridge::PixelFormat FrameConsumerBridge::GetPixelFormat() {
- return FORMAT_RGBA;
-}
-
-} // namespace remoting
« no previous file with comments | « remoting/client/ios/bridge/frame_consumer_bridge.h ('k') | remoting/client/ios/bridge/frame_consumer_bridge_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698