OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "media/capture/content/capture_resolution_chooser.h" | 5 #include "media/capture/content/capture_resolution_chooser.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/macros.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
9 | 12 |
10 using tracked_objects::Location; | 13 using tracked_objects::Location; |
11 | 14 |
12 namespace media { | 15 namespace media { |
13 | 16 |
14 namespace { | 17 namespace { |
15 | 18 |
16 // 16:9 maximum and minimum frame sizes. | 19 // 16:9 maximum and minimum frame sizes. |
17 const int kMaxFrameWidth = 3840; | 20 const int kMaxFrameWidth = 3840; |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 // For a chooser configured with the "any within limit" policy, the smallest | 344 // For a chooser configured with the "any within limit" policy, the smallest |
342 // possible computed size is smallest non-empty snapped size (which is 90 | 345 // possible computed size is smallest non-empty snapped size (which is 90 |
343 // lines of resolution) with the same aspect ratio as the maximum size. | 346 // lines of resolution) with the same aspect ratio as the maximum size. |
344 const gfx::Size smallest_size(90 * kMaxFrameWidth / kMaxFrameHeight, 90); | 347 const gfx::Size smallest_size(90 * kMaxFrameWidth / kMaxFrameHeight, 90); |
345 | 348 |
346 TestSnappedFrameSizes(&chooser, smallest_size); | 349 TestSnappedFrameSizes(&chooser, smallest_size); |
347 TestTargetedFrameAreas(&chooser, smallest_size); | 350 TestTargetedFrameAreas(&chooser, smallest_size); |
348 } | 351 } |
349 | 352 |
350 } // namespace media | 353 } // namespace media |
OLD | NEW |