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

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

Issue 1825633002: Adds UMA histograms for desktop tab and audio capture through (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 scoped_refptr<SiteInstance> site_instance = 613 scoped_refptr<SiteInstance> site_instance =
614 SiteInstance::Create(browser_context_.get()); 614 SiteInstance::Create(browser_context_.get());
615 SiteInstanceImpl::set_render_process_host_factory( 615 SiteInstanceImpl::set_render_process_host_factory(
616 render_process_host_factory_.get()); 616 render_process_host_factory_.get());
617 web_contents_.reset( 617 web_contents_.reset(
618 TestWebContents::Create(browser_context_.get(), site_instance.get())); 618 TestWebContents::Create(browser_context_.get(), site_instance.get()));
619 RenderFrameHost* const main_frame = web_contents_->GetMainFrame(); 619 RenderFrameHost* const main_frame = web_contents_->GetMainFrame();
620 device_.reset(WebContentsVideoCaptureDevice::Create( 620 device_.reset(WebContentsVideoCaptureDevice::Create(
621 base::StringPrintf("web-contents-media-stream://%d:%d", 621 base::StringPrintf("web-contents-media-stream://%d:%d",
622 main_frame->GetProcess()->GetID(), 622 main_frame->GetProcess()->GetID(),
623 main_frame->GetRoutingID()))); 623 main_frame->GetRoutingID()),
624 WebContentsVideoCaptureDevice::NONE_TYPE));
624 625
625 base::RunLoop().RunUntilIdle(); 626 base::RunLoop().RunUntilIdle();
626 } 627 }
627 628
628 void TearDown() override { 629 void TearDown() override {
629 // Tear down in opposite order of set-up. 630 // Tear down in opposite order of set-up.
630 631
631 // The device is destroyed asynchronously, and will notify the 632 // The device is destroyed asynchronously, and will notify the
632 // CaptureTestSourceController when it finishes destruction. 633 // CaptureTestSourceController when it finishes destruction.
633 // Trigger this, and wait. 634 // Trigger this, and wait.
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 policies[i], gfx::Size(1000, 1000), gfx::Size(1000, 1000)); 1150 policies[i], gfx::Size(1000, 1000), gfx::Size(1000, 1000));
1150 RunTestForPreferredSize( 1151 RunTestForPreferredSize(
1151 policies[i], gfx::Size(1600, 1000), gfx::Size(1600, 1000)); 1152 policies[i], gfx::Size(1600, 1000), gfx::Size(1600, 1000));
1152 RunTestForPreferredSize( 1153 RunTestForPreferredSize(
1153 policies[i], gfx::Size(837, 999), gfx::Size(837, 999)); 1154 policies[i], gfx::Size(837, 999), gfx::Size(837, 999));
1154 } 1155 }
1155 } 1156 }
1156 1157
1157 } // namespace 1158 } // namespace
1158 } // namespace content 1159 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698