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

Side by Side Diff: remoting/host/shaped_screen_capturer_unittest.cc

Issue 134633004: Roll libjingle+webrtc to r5397. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/shaped_screen_capturer.cc ('k') | third_party/libjingle/README.chromium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "remoting/host/shaped_screen_capturer.h" 5 #include "remoting/host/shaped_screen_capturer.h"
6 6
7 #include "remoting/host/desktop_shape_tracker.h" 7 #include "remoting/host/desktop_shape_tracker.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" 9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 10 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
(...skipping 15 matching lines...) Expand all
26 virtual void Capture(const webrtc::DesktopRegion& region) OVERRIDE { 26 virtual void Capture(const webrtc::DesktopRegion& region) OVERRIDE {
27 webrtc::DesktopFrame* frame = new webrtc::BasicDesktopFrame( 27 webrtc::DesktopFrame* frame = new webrtc::BasicDesktopFrame(
28 webrtc::DesktopSize(kScreenSize, kScreenSize)); 28 webrtc::DesktopSize(kScreenSize, kScreenSize));
29 memset(frame->data(), 0, frame->stride() * kScreenSize); 29 memset(frame->data(), 0, frame->stride() * kScreenSize);
30 callback_->OnCaptureCompleted(frame); 30 callback_->OnCaptureCompleted(frame);
31 } 31 }
32 32
33 virtual void SetMouseShapeObserver( 33 virtual void SetMouseShapeObserver(
34 MouseShapeObserver* mouse_shape_observer) OVERRIDE { 34 MouseShapeObserver* mouse_shape_observer) OVERRIDE {
35 } 35 }
36 virtual bool GetScreenList(ScreenList* screens) OVERRIDE {
37 return false;
38 }
39 virtual bool SelectScreen(webrtc::ScreenId id) OVERRIDE {
40 return false;
41 }
36 42
37 private: 43 private:
38 Callback* callback_; 44 Callback* callback_;
39 }; 45 };
40 46
41 class FakeDesktopShapeTracker : public DesktopShapeTracker { 47 class FakeDesktopShapeTracker : public DesktopShapeTracker {
42 public: 48 public:
43 FakeDesktopShapeTracker() {} 49 FakeDesktopShapeTracker() {}
44 virtual ~FakeDesktopShapeTracker() {} 50 virtual ~FakeDesktopShapeTracker() {}
45 51
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 scoped_ptr<DesktopShapeTracker>(new FakeDesktopShapeTracker())); 92 scoped_ptr<DesktopShapeTracker>(new FakeDesktopShapeTracker()));
87 capturer.Start(this); 93 capturer.Start(this);
88 capturer.Capture(webrtc::DesktopRegion()); 94 capturer.Capture(webrtc::DesktopRegion());
89 ASSERT_TRUE(last_frame_.get()); 95 ASSERT_TRUE(last_frame_.get());
90 ASSERT_TRUE(last_frame_->shape()); 96 ASSERT_TRUE(last_frame_->shape());
91 EXPECT_TRUE( 97 EXPECT_TRUE(
92 FakeDesktopShapeTracker::CreateShape().Equals(*last_frame_->shape())); 98 FakeDesktopShapeTracker::CreateShape().Equals(*last_frame_->shape()));
93 } 99 }
94 100
95 } // namespace remoting 101 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/shaped_screen_capturer.cc ('k') | third_party/libjingle/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698