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

Side by Side Diff: ui/snapshot/snapshot_aura.cc

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_async.cc ('k') | ui/snapshot/snapshot_aura_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/snapshot/snapshot.h" 5 #include "ui/snapshot/snapshot.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 18 matching lines...) Expand all
29 std::vector<unsigned char>* png_representation, 29 std::vector<unsigned char>* png_representation,
30 const gfx::Rect& snapshot_bounds) { 30 const gfx::Rect& snapshot_bounds) {
31 // Not supported in Aura. Callers should fall back to the async version. 31 // Not supported in Aura. Callers should fall back to the async version.
32 return false; 32 return false;
33 } 33 }
34 34
35 static void MakeAsyncCopyRequest( 35 static void MakeAsyncCopyRequest(
36 gfx::NativeWindow window, 36 gfx::NativeWindow window,
37 const gfx::Rect& source_rect, 37 const gfx::Rect& source_rect,
38 const cc::CopyOutputRequest::CopyOutputRequestCallback& callback) { 38 const cc::CopyOutputRequest::CopyOutputRequestCallback& callback) {
39 scoped_ptr<cc::CopyOutputRequest> request = 39 std::unique_ptr<cc::CopyOutputRequest> request =
40 cc::CopyOutputRequest::CreateBitmapRequest(callback); 40 cc::CopyOutputRequest::CreateBitmapRequest(callback);
41 request->set_area(source_rect); 41 request->set_area(source_rect);
42 window->layer()->RequestCopyOfOutput(std::move(request)); 42 window->layer()->RequestCopyOfOutput(std::move(request));
43 } 43 }
44 44
45 void GrabWindowSnapshotAndScaleAsync( 45 void GrabWindowSnapshotAndScaleAsync(
46 gfx::NativeWindow window, 46 gfx::NativeWindow window,
47 const gfx::Rect& source_rect, 47 const gfx::Rect& source_rect,
48 const gfx::Size& target_size, 48 const gfx::Size& target_size,
49 scoped_refptr<base::TaskRunner> background_task_runner, 49 scoped_refptr<base::TaskRunner> background_task_runner,
(...skipping 21 matching lines...) Expand all
71 void GrabViewSnapshotAsync( 71 void GrabViewSnapshotAsync(
72 gfx::NativeView view, 72 gfx::NativeView view,
73 const gfx::Rect& source_rect, 73 const gfx::Rect& source_rect,
74 scoped_refptr<base::TaskRunner> background_task_runner, 74 scoped_refptr<base::TaskRunner> background_task_runner,
75 const GrabWindowSnapshotAsyncPNGCallback& callback) { 75 const GrabWindowSnapshotAsyncPNGCallback& callback) {
76 GrabWindowSnapshotAsync(view, source_rect, background_task_runner, callback); 76 GrabWindowSnapshotAsync(view, source_rect, background_task_runner, callback);
77 } 77 }
78 78
79 79
80 } // namespace ui 80 } // namespace ui
OLDNEW
« no previous file with comments | « ui/snapshot/snapshot_async.cc ('k') | ui/snapshot/snapshot_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698