Chromium Code Reviews| Index: ui/snapshot/snapshot_async.h |
| diff --git a/ui/snapshot/snapshot_async.h b/ui/snapshot/snapshot_async.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9a2092d3d8421a69b71e6f9f983f3c6aac1523ff |
| --- /dev/null |
| +++ b/ui/snapshot/snapshot_async.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
|
Ted C
2014/05/14 01:13:18
don't need the (c) anymore
danakj
2014/05/14 14:33:20
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_SNAPSHOT_SNAPSHOT_ASYNC_H_ |
| +#define UI_SNAPSHOT_SNAPSHOT_ASYNC_H_ |
| + |
| +#include "cc/output/copy_output_result.h" |
| +#include "ui/snapshot/snapshot.h" |
| + |
| +namespace base { |
| +class TaskRunner; |
| +} |
| + |
| +namespace gfx { |
| +class Size; |
| +} |
| + |
| +namespace ui { |
| + |
| +// Helper methods for async snapshots to convert a cc::CopyOutputResult into a |
| +// ui::GrabWindowSnapshot callback. |
| +class SnapshotAsync { |
| + public: |
| + static void ScaleCopyOutputResult( |
| + const GrabWindowSnapshotAsyncCallback& callback, |
| + const gfx::Size& target_size, |
| + scoped_refptr<base::TaskRunner> background_task_runner, |
| + scoped_ptr<cc::CopyOutputResult> result); |
| + |
| + static void EncodeCopyOutputResult( |
| + const GrabWindowSnapshotAsyncPNGCallback& callback, |
| + scoped_refptr<base::TaskRunner> background_task_runner, |
| + scoped_ptr<cc::CopyOutputResult> result); |
| + |
| + private: |
| + SnapshotAsync(); // Not instantiable. |
|
sky
2014/05/13 23:43:13
SnapshotAsync->DISALLOW_IMPLICIT_CONSTRUCTORS
danakj
2014/05/14 14:33:20
Done.
|
| +}; |
| + |
| +} // namespace ui |
| + |
| +#endif // UI_SNAPSHOT_SNAPSHOT_ASYNC_H_ |