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

Unified Diff: remoting/host/fake_host_extension.cc

Issue 468613002: Readability review. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 4 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 | « remoting/host/fake_host_extension.h ('k') | remoting/host/host_extension_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/fake_host_extension.cc
diff --git a/remoting/host/fake_host_extension.cc b/remoting/host/fake_host_extension.cc
index 7f5c8c3f1259179aa97b627d841a57edad4c30ba..c16cd034cb5d880081a61d26c585014c05d9a0ce 100644
--- a/remoting/host/fake_host_extension.cc
+++ b/remoting/host/fake_host_extension.cc
@@ -19,10 +19,10 @@ class FakeExtension::Session : public HostExtensionSession {
Session(FakeExtension* extension, const std::string& message_type);
virtual ~Session() {}
- virtual scoped_ptr<webrtc::DesktopCapturer> OnCreateVideoCapturer(
- scoped_ptr<webrtc::DesktopCapturer> encoder) OVERRIDE;
- virtual scoped_ptr<VideoEncoder> OnCreateVideoEncoder(
- scoped_ptr<VideoEncoder> encoder) OVERRIDE;
+ // HostExtensionSession interface.
+ virtual void OnCreateVideoCapturer(
+ scoped_ptr<webrtc::DesktopCapturer>* encoder) OVERRIDE;
+ virtual void OnCreateVideoEncoder(scoped_ptr<VideoEncoder>* encoder) OVERRIDE;
virtual bool ModifiesVideoPipeline() const OVERRIDE;
virtual bool OnExtensionMessage(
ClientSessionControl* client_session_control,
@@ -42,20 +42,17 @@ FakeExtension::Session::Session(
message_type_(message_type) {
}
-scoped_ptr<webrtc::DesktopCapturer>
-FakeExtension::Session::OnCreateVideoCapturer(
- scoped_ptr<webrtc::DesktopCapturer> capturer) {
+void FakeExtension::Session::OnCreateVideoCapturer(
+ scoped_ptr<webrtc::DesktopCapturer>* capturer) {
extension_->has_wrapped_video_capturer_ = true;
if (extension_->steal_video_capturer_) {
- capturer.reset();
+ capturer->reset();
}
- return capturer.Pass();
}
-scoped_ptr<VideoEncoder> FakeExtension::Session::OnCreateVideoEncoder(
- scoped_ptr<VideoEncoder> encoder) {
+void FakeExtension::Session::OnCreateVideoEncoder(
+ scoped_ptr<VideoEncoder>* encoder) {
extension_->has_wrapped_video_encoder_ = true;
- return encoder.Pass();
}
bool FakeExtension::Session::ModifiesVideoPipeline() const {
@@ -100,23 +97,4 @@ scoped_ptr<HostExtensionSession> FakeExtension::CreateExtensionSession(
return session.Pass();
}
-void FakeExtension::set_steal_video_capturer(bool steal_video_capturer) {
- steal_video_capturer_ = steal_video_capturer;
-}
-
-bool FakeExtension::has_wrapped_video_encoder() {
- DCHECK(was_instantiated());
- return has_wrapped_video_encoder_;
-}
-
-bool FakeExtension::has_wrapped_video_capturer() {
- DCHECK(was_instantiated());
- return has_wrapped_video_capturer_;
-}
-
-bool FakeExtension::has_handled_message() {
- DCHECK(was_instantiated());
- return has_handled_message_;
-}
-
} // namespace remoting
« no previous file with comments | « remoting/host/fake_host_extension.h ('k') | remoting/host/host_extension_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698