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

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

Issue 462173002: Fix set_area sizes for RequestCopyOfOutput, and related tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove 'middle 3 columns' exception, per sky@. Created 6 years, 4 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_browsertest.cc ('k') | no next file » | 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 #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 23 matching lines...) Expand all
34 SNAPSHOT_EXPORT bool GrabWindowSnapshot( 34 SNAPSHOT_EXPORT bool GrabWindowSnapshot(
35 gfx::NativeWindow window, 35 gfx::NativeWindow window,
36 std::vector<unsigned char>* png_representation, 36 std::vector<unsigned char>* png_representation,
37 const gfx::Rect& snapshot_bounds); 37 const gfx::Rect& snapshot_bounds);
38 38
39 SNAPSHOT_EXPORT bool GrabViewSnapshot( 39 SNAPSHOT_EXPORT bool GrabViewSnapshot(
40 gfx::NativeView view, 40 gfx::NativeView view,
41 std::vector<unsigned char>* png_representation, 41 std::vector<unsigned char>* png_representation,
42 const gfx::Rect& snapshot_bounds); 42 const gfx::Rect& snapshot_bounds);
43 43
44
45 // These functions take a snapshot of |source_rect|, specified in layer space
46 // coordinates (DIP for desktop, physical pixels for Android), and scale the
47 // snapshot to |target_size| (in physical pixels), asynchronously.
44 typedef base::Callback<void(const gfx::Image& snapshot)> 48 typedef base::Callback<void(const gfx::Image& snapshot)>
45 GrabWindowSnapshotAsyncCallback; 49 GrabWindowSnapshotAsyncCallback;
46 // GrabWindowSnapshotAndScaleAsync() copies snapshot of |source_rect| from
47 // window and scales it to |target_size| asynchronously.
48 SNAPSHOT_EXPORT void GrabWindowSnapshotAndScaleAsync( 50 SNAPSHOT_EXPORT void GrabWindowSnapshotAndScaleAsync(
49 gfx::NativeWindow window, 51 gfx::NativeWindow window,
50 const gfx::Rect& source_rect, 52 const gfx::Rect& source_rect,
51 const gfx::Size& target_size, 53 const gfx::Size& target_size,
52 scoped_refptr<base::TaskRunner> background_task_runner, 54 scoped_refptr<base::TaskRunner> background_task_runner,
53 const GrabWindowSnapshotAsyncCallback& callback); 55 const GrabWindowSnapshotAsyncCallback& callback);
54 56
55 typedef base::Callback<void(scoped_refptr<base::RefCountedBytes> png_data)> 57 typedef base::Callback<void(scoped_refptr<base::RefCountedBytes> png_data)>
56 GrabWindowSnapshotAsyncPNGCallback; 58 GrabWindowSnapshotAsyncPNGCallback;
57 SNAPSHOT_EXPORT void GrabWindowSnapshotAsync( 59 SNAPSHOT_EXPORT void GrabWindowSnapshotAsync(
58 gfx::NativeWindow window, 60 gfx::NativeWindow window,
59 const gfx::Rect& source_rect, 61 const gfx::Rect& source_rect,
60 scoped_refptr<base::TaskRunner> background_task_runner, 62 scoped_refptr<base::TaskRunner> background_task_runner,
61 const GrabWindowSnapshotAsyncPNGCallback& callback); 63 const GrabWindowSnapshotAsyncPNGCallback& callback);
62 SNAPSHOT_EXPORT void GrabViewSnapshotAsync( 64 SNAPSHOT_EXPORT void GrabViewSnapshotAsync(
63 gfx::NativeView view, 65 gfx::NativeView view,
64 const gfx::Rect& source_rect, 66 const gfx::Rect& source_rect,
65 scoped_refptr<base::TaskRunner> background_task_runner, 67 scoped_refptr<base::TaskRunner> background_task_runner,
66 const GrabWindowSnapshotAsyncPNGCallback& callback); 68 const GrabWindowSnapshotAsyncPNGCallback& callback);
67 69
68 } // namespace ui 70 } // namespace ui
69 71
70 #endif // UI_SNAPSHOT_SNAPSHOT_H_ 72 #endif // UI_SNAPSHOT_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698