OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_SNAPSHOT_SNAPSHOT_ASYNC_H_ |
| 6 #define UI_SNAPSHOT_SNAPSHOT_ASYNC_H_ |
| 7 |
| 8 #include "cc/output/copy_output_result.h" |
| 9 #include "ui/snapshot/snapshot.h" |
| 10 |
| 11 namespace base { |
| 12 class TaskRunner; |
| 13 } |
| 14 |
| 15 namespace gfx { |
| 16 class Size; |
| 17 } |
| 18 |
| 19 namespace ui { |
| 20 |
| 21 // Helper methods for async snapshots to convert a cc::CopyOutputResult into a |
| 22 // ui::GrabWindowSnapshot callback. |
| 23 class SnapshotAsync { |
| 24 public: |
| 25 static void ScaleCopyOutputResult( |
| 26 const GrabWindowSnapshotAsyncCallback& callback, |
| 27 const gfx::Size& target_size, |
| 28 scoped_refptr<base::TaskRunner> background_task_runner, |
| 29 scoped_ptr<cc::CopyOutputResult> result); |
| 30 |
| 31 static void EncodeCopyOutputResult( |
| 32 const GrabWindowSnapshotAsyncPNGCallback& callback, |
| 33 scoped_refptr<base::TaskRunner> background_task_runner, |
| 34 scoped_ptr<cc::CopyOutputResult> result); |
| 35 |
| 36 private: |
| 37 DISALLOW_IMPLICIT_CONSTRUCTORS(SnapshotAsync); |
| 38 }; |
| 39 |
| 40 } // namespace ui |
| 41 |
| 42 #endif // UI_SNAPSHOT_SNAPSHOT_ASYNC_H_ |
OLD | NEW |