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

Unified Diff: media/remoting/fake_remoter.cc

Issue 2643253003: Media Remoting Clean-up: Less-redundant naming, style consistency, etc. (Closed)
Patch Set: REBASE Created 3 years, 11 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
« no previous file with comments | « media/remoting/fake_remoter.h ('k') | media/remoting/fake_remoting_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/remoting/fake_remoter.cc
diff --git a/media/remoting/fake_remoting_controller.cc b/media/remoting/fake_remoter.cc
similarity index 89%
rename from media/remoting/fake_remoting_controller.cc
rename to media/remoting/fake_remoter.cc
index f1bbdfb0b2bb4e39f696eff023cc4c9c1d2dd25a..26259a6436cf0aea2b99c59b7d8d251d6e0de712 100644
--- a/media/remoting/fake_remoting_controller.cc
+++ b/media/remoting/fake_remoter.cc
@@ -2,19 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "media/remoting/fake_remoting_controller.h"
+#include "media/remoting/fake_remoter.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/memory/ptr_util.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "media/remoting/remoting_source_impl.h"
-#include "media/remoting/rpc/proto_utils.h"
+#include "media/remoting/proto_utils.h"
+#include "media/remoting/shared_session.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
+namespace remoting {
FakeRemotingDataStreamSender::FakeRemotingDataStreamSender(
mojom::RemotingDataStreamSenderRequest request,
@@ -45,8 +46,8 @@ bool FakeRemotingDataStreamSender::ValidateFrameBuffer(size_t index,
}
const std::vector<uint8_t>& data = received_frame_list[index];
- scoped_refptr<::media::DecoderBuffer> media_buffer =
- remoting::ByteArrayToDecoderBuffer(data.data(), data.size());
+ scoped_refptr<DecoderBuffer> media_buffer =
+ ByteArrayToDecoderBuffer(data.data(), data.size());
// Checks if pts is correct or not
if (media_buffer->timestamp().InMilliseconds() != pts_ms) {
@@ -175,17 +176,18 @@ void FakeRemoterFactory::Create(mojom::RemotingSourcePtr source,
std::move(request));
}
-scoped_refptr<RemotingSourceImpl> CreateRemotingSourceImpl(
+// static
+scoped_refptr<SharedSession> FakeRemoterFactory::CreateSharedSession(
bool start_will_fail) {
mojom::RemotingSourcePtr remoting_source;
mojom::RemotingSourceRequest remoting_source_request(&remoting_source);
mojom::RemoterPtr remoter;
- std::unique_ptr<mojom::RemoterFactory> remoter_factory =
- base::MakeUnique<FakeRemoterFactory>(start_will_fail);
- remoter_factory->Create(std::move(remoting_source),
- mojo::MakeRequest(&remoter));
- return new RemotingSourceImpl(std::move(remoting_source_request),
- std::move(remoter));
+ FakeRemoterFactory remoter_factory(start_will_fail);
+ remoter_factory.Create(std::move(remoting_source),
+ mojo::MakeRequest(&remoter));
+ return new SharedSession(std::move(remoting_source_request),
+ std::move(remoter));
}
+} // namespace remoting
} // namespace media
« no previous file with comments | « media/remoting/fake_remoter.h ('k') | media/remoting/fake_remoting_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698