Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: ui/snapshot/snapshot_async.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/snapshot/snapshot_android.cc ('k') | ui/snapshot/snapshot_async.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 UI_SNAPSHOT_SNAPSHOT_ASYNC_H_ 5 #ifndef UI_SNAPSHOT_SNAPSHOT_ASYNC_H_
6 #define UI_SNAPSHOT_SNAPSHOT_ASYNC_H_ 6 #define UI_SNAPSHOT_SNAPSHOT_ASYNC_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "cc/output/copy_output_result.h" 11 #include "cc/output/copy_output_result.h"
11 #include "ui/snapshot/snapshot.h" 12 #include "ui/snapshot/snapshot.h"
12 13
13 namespace base { 14 namespace base {
14 class TaskRunner; 15 class TaskRunner;
15 } 16 }
16 17
17 namespace gfx { 18 namespace gfx {
18 class Size; 19 class Size;
19 } 20 }
20 21
21 namespace ui { 22 namespace ui {
22 23
23 // Helper methods for async snapshots to convert a cc::CopyOutputResult into a 24 // Helper methods for async snapshots to convert a cc::CopyOutputResult into a
24 // ui::GrabWindowSnapshot callback. 25 // ui::GrabWindowSnapshot callback.
25 class SnapshotAsync { 26 class SnapshotAsync {
26 public: 27 public:
27 static void ScaleCopyOutputResult( 28 static void ScaleCopyOutputResult(
28 const GrabWindowSnapshotAsyncCallback& callback, 29 const GrabWindowSnapshotAsyncCallback& callback,
29 const gfx::Size& target_size, 30 const gfx::Size& target_size,
30 scoped_refptr<base::TaskRunner> background_task_runner, 31 scoped_refptr<base::TaskRunner> background_task_runner,
31 scoped_ptr<cc::CopyOutputResult> result); 32 std::unique_ptr<cc::CopyOutputResult> result);
32 33
33 static void EncodeCopyOutputResult( 34 static void EncodeCopyOutputResult(
34 const GrabWindowSnapshotAsyncPNGCallback& callback, 35 const GrabWindowSnapshotAsyncPNGCallback& callback,
35 scoped_refptr<base::TaskRunner> background_task_runner, 36 scoped_refptr<base::TaskRunner> background_task_runner,
36 scoped_ptr<cc::CopyOutputResult> result); 37 std::unique_ptr<cc::CopyOutputResult> result);
37 38
38 private: 39 private:
39 DISALLOW_IMPLICIT_CONSTRUCTORS(SnapshotAsync); 40 DISALLOW_IMPLICIT_CONSTRUCTORS(SnapshotAsync);
40 }; 41 };
41 42
42 } // namespace ui 43 } // namespace ui
43 44
44 #endif // UI_SNAPSHOT_SNAPSHOT_ASYNC_H_ 45 #endif // UI_SNAPSHOT_SNAPSHOT_ASYNC_H_
OLDNEW
« no previous file with comments | « ui/snapshot/snapshot_android.cc ('k') | ui/snapshot/snapshot_async.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698