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

Side by Side Diff: content/browser/media/capture/web_contents_video_capture_device_unittest.cc

Issue 1412173003: cast: support cursor rendering for tab capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed left over logs Created 5 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/media/capture/web_contents_video_capture_device.h" 5 #include "content/browser/media/capture/web_contents_video_capture_device.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/debug/debugger.h" 8 #include "base/debug/debugger.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 fake_bounds_ = rect; 187 fake_bounds_ = rect;
188 } 188 }
189 189
190 bool CanCopyToVideoFrame() const override { 190 bool CanCopyToVideoFrame() const override {
191 return controller_->CanCopyToVideoFrame(); 191 return controller_->CanCopyToVideoFrame();
192 } 192 }
193 193
194 void CopyFromCompositingSurfaceToVideoFrame( 194 void CopyFromCompositingSurfaceToVideoFrame(
195 const gfx::Rect& src_subrect, 195 const gfx::Rect& src_subrect,
196 const scoped_refptr<media::VideoFrame>& target, 196 const scoped_refptr<media::VideoFrame>& target,
197 const base::Callback<void(bool)>& callback) override { 197 const base::Callback<void(gfx::Rect, bool)>& callback) override {
198 SkColor c = ConvertRgbToYuv(controller_->GetSolidColor()); 198 SkColor c = ConvertRgbToYuv(controller_->GetSolidColor());
199 media::FillYUV( 199 media::FillYUV(
200 target.get(), SkColorGetR(c), SkColorGetG(c), SkColorGetB(c)); 200 target.get(), SkColorGetR(c), SkColorGetG(c), SkColorGetB(c));
201 callback.Run(true); 201 callback.Run(gfx::Rect(), true);
202 controller_->SignalCopy(); 202 controller_->SignalCopy();
203 } 203 }
204 204
205 void BeginFrameSubscription( 205 void BeginFrameSubscription(
206 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override { 206 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override {
207 subscriber_.reset(subscriber.release()); 207 subscriber_.reset(subscriber.release());
208 } 208 }
209 209
210 void EndFrameSubscription() override { subscriber_.reset(); } 210 void EndFrameSubscription() override { subscriber_.reset(); }
211 211
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 policies[i], gfx::Size(1000, 1000), gfx::Size(1000, 1000)); 1134 policies[i], gfx::Size(1000, 1000), gfx::Size(1000, 1000));
1135 RunTestForPreferredSize( 1135 RunTestForPreferredSize(
1136 policies[i], gfx::Size(1600, 1000), gfx::Size(1600, 1000)); 1136 policies[i], gfx::Size(1600, 1000), gfx::Size(1600, 1000));
1137 RunTestForPreferredSize( 1137 RunTestForPreferredSize(
1138 policies[i], gfx::Size(837, 999), gfx::Size(837, 999)); 1138 policies[i], gfx::Size(837, 999), gfx::Size(837, 999));
1139 } 1139 }
1140 } 1140 }
1141 1141
1142 } // namespace 1142 } // namespace
1143 } // namespace content 1143 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698