OLD | NEW |
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 CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ | 5 #ifndef CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ |
6 #define CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ | 6 #define CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Rect; | 13 class Rect; |
14 } | 14 } |
15 | 15 |
16 namespace browser { | 16 namespace chrome { |
17 | 17 |
18 // Grabs a snapshot of the rectangle area |snapshot_bounds| with respect to the | 18 // Grabs a snapshot of the rectangle area |snapshot_bounds| with respect to the |
19 // top left corner of the designated window and stores a PNG representation | 19 // top left corner of the designated window and stores a PNG representation |
20 // into a byte vector. On Windows, |window| may be NULL to grab a snapshot of | 20 // into a byte vector. On Windows, |window| may be NULL to grab a snapshot of |
21 // the primary monitor. Returns true if the operation is successful. | 21 // the primary monitor. Returns true if the operation is successful. |
22 bool GrabWindowSnapshot(gfx::NativeWindow window, | 22 bool GrabWindowSnapshot(gfx::NativeWindow window, |
23 std::vector<unsigned char>* png_representation, | 23 std::vector<unsigned char>* png_representation, |
24 const gfx::Rect& snapshot_bounds); | 24 const gfx::Rect& snapshot_bounds); |
25 | 25 |
26 } // namespace browser | 26 } // namespace chrome |
27 | 27 |
28 #endif // CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ | 28 #endif // CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ |
OLD | NEW |