OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_THUMBNAILS_SIMPLE_THUMBNAIL_CROP_H_ | 5 #ifndef CHROME_BROWSER_THUMBNAILS_SIMPLE_THUMBNAIL_CROP_H_ |
6 #define CHROME_BROWSER_THUMBNAILS_SIMPLE_THUMBNAIL_CROP_H_ | 6 #define CHROME_BROWSER_THUMBNAILS_SIMPLE_THUMBNAIL_CROP_H_ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "chrome/browser/thumbnails/thumbnailing_algorithm.h" | 9 #include "chrome/browser/thumbnails/thumbnailing_algorithm.h" |
9 | 10 |
10 namespace thumbnails { | 11 namespace thumbnails { |
11 | 12 |
12 // The implementation of the 'classic' thumbnail cropping algorithm. It is not | 13 // The implementation of the 'classic' thumbnail cropping algorithm. It is not |
13 // content-driven in any meaningful way (save for score calculation). Rather, | 14 // content-driven in any meaningful way (save for score calculation). Rather, |
14 // the choice of a cropping region is based on relation between source and | 15 // the choice of a cropping region is based on relation between source and |
15 // target sizes. The selected source region is then rescaled into the target | 16 // target sizes. The selected source region is then rescaled into the target |
16 // thumbnail image. | 17 // thumbnail image. |
17 class SimpleThumbnailCrop : public ThumbnailingAlgorithm { | 18 class SimpleThumbnailCrop : public ThumbnailingAlgorithm { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 62 |
62 // The target size of the captured thumbnails, in DIPs. | 63 // The target size of the captured thumbnails, in DIPs. |
63 const gfx::Size target_size_; | 64 const gfx::Size target_size_; |
64 | 65 |
65 DISALLOW_COPY_AND_ASSIGN(SimpleThumbnailCrop); | 66 DISALLOW_COPY_AND_ASSIGN(SimpleThumbnailCrop); |
66 }; | 67 }; |
67 | 68 |
68 } // namespace thumbnails | 69 } // namespace thumbnails |
69 | 70 |
70 #endif // CHROME_BROWSER_THUMBNAILS_SIMPLE_THUMBNAIL_CROP_H_ | 71 #endif // CHROME_BROWSER_THUMBNAILS_SIMPLE_THUMBNAIL_CROP_H_ |
OLD | NEW |