| OLD | NEW |
| 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 "content/browser/media/capture/desktop_capture_device_aura.h" | 5 #include "content/browser/media/capture/desktop_capture_device_aura.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> |
| 9 | 10 |
| 10 #include "base/location.h" | 11 #include "base/location.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/synchronization/waitable_event.h" | 13 #include "base/synchronization/waitable_event.h" |
| 13 #include "content/browser/browser_thread_impl.h" | 14 #include "content/browser/browser_thread_impl.h" |
| 14 #include "content/public/browser/desktop_media_id.h" | 15 #include "content/public/browser/desktop_media_id.h" |
| 15 #include "media/base/video_capture_types.h" | 16 #include "media/base/video_capture_types.h" |
| 16 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "ui/aura/client/window_tree_client.h" | 19 #include "ui/aura/client/window_tree_client.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 content::DesktopMediaID::TYPE_SCREEN, root_window())); | 147 content::DesktopMediaID::TYPE_SCREEN, root_window())); |
| 147 ASSERT_TRUE(capture_device.get()); | 148 ASSERT_TRUE(capture_device.get()); |
| 148 | 149 |
| 149 scoped_ptr<MockDeviceClient> client(new MockDeviceClient()); | 150 scoped_ptr<MockDeviceClient> client(new MockDeviceClient()); |
| 150 EXPECT_CALL(*client, OnError(_, _)).Times(0); | 151 EXPECT_CALL(*client, OnError(_, _)).Times(0); |
| 151 | 152 |
| 152 media::VideoCaptureParams capture_params; | 153 media::VideoCaptureParams capture_params; |
| 153 capture_params.requested_format.frame_size.SetSize(640, 480); | 154 capture_params.requested_format.frame_size.SetSize(640, 480); |
| 154 capture_params.requested_format.frame_rate = kFrameRate; | 155 capture_params.requested_format.frame_rate = kFrameRate; |
| 155 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; | 156 capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; |
| 156 capture_device->AllocateAndStart(capture_params, client.Pass()); | 157 capture_device->AllocateAndStart(capture_params, std::move(client)); |
| 157 capture_device->StopAndDeAllocate(); | 158 capture_device->StopAndDeAllocate(); |
| 158 } | 159 } |
| 159 | 160 |
| 160 } // namespace | 161 } // namespace |
| 161 } // namespace content | 162 } // namespace content |
| OLD | NEW |