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

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

Issue 119753007: Add GrabWindowSnapshotAsync tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test both sync and async paths Created 6 years, 11 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 | Annotate | Revision Log
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 #ifndef UI_SNAPSHOT_SNAPSHOT_H_ 5 #ifndef UI_SNAPSHOT_SNAPSHOT_H_
6 #define UI_SNAPSHOT_SNAPSHOT_H_ 6 #define UI_SNAPSHOT_SNAPSHOT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 25 matching lines...) Expand all
36 36
37 SNAPSHOT_EXPORT bool GrabViewSnapshot( 37 SNAPSHOT_EXPORT bool GrabViewSnapshot(
38 gfx::NativeView view, 38 gfx::NativeView view,
39 std::vector<unsigned char>* png_representation, 39 std::vector<unsigned char>* png_representation,
40 const gfx::Rect& snapshot_bounds); 40 const gfx::Rect& snapshot_bounds);
41 41
42 // GrabWindowSnapshotAsync() copies snapshot of |source_rect| from window and 42 // GrabWindowSnapshotAsync() copies snapshot of |source_rect| from window and
43 // scales it to |target_size| asynchronously. 43 // scales it to |target_size| asynchronously.
44 typedef base::Callback<void(const gfx::Image& snapshot)> 44 typedef base::Callback<void(const gfx::Image& snapshot)>
45 GrabWindowSnapshotAsyncCallback; 45 GrabWindowSnapshotAsyncCallback;
46 SNAPSHOT_EXPORT void GrabWindowSnapshotAsync( 46 SNAPSHOT_EXPORT void GrabWindowSnapshotAsync(
Sergey Ulanov 2014/01/05 07:34:40 Maybe rename this to GrabWindowSnapshotAndScaleAsy
enne (OOO) 2014/01/07 00:25:25 Done.
47 gfx::NativeWindow window, 47 gfx::NativeWindow window,
48 const gfx::Rect& source_rect, 48 const gfx::Rect& source_rect,
49 const gfx::Size& target_size, 49 const gfx::Size& target_size,
50 scoped_refptr<base::TaskRunner> background_task_runner, 50 scoped_refptr<base::TaskRunner> background_task_runner,
51 const GrabWindowSnapshotAsyncCallback& callback); 51 const GrabWindowSnapshotAsyncCallback& callback);
52 SNAPSHOT_EXPORT void GrabWindowSnapshotAsync(
53 gfx::NativeWindow window,
54 const gfx::Rect& source_rect,
55 scoped_refptr<base::TaskRunner> background_task_runner,
56 const GrabWindowSnapshotAsyncCallback& callback);
52 57
53 } // namespace ui 58 } // namespace ui
54 59
55 #endif // UI_SNAPSHOT_SNAPSHOT_H_ 60 #endif // UI_SNAPSHOT_SNAPSHOT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698