OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |