OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ | |
6 #define CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "ui/gfx/native_widget_types.h" | |
11 #include "ui/snapshot/snapshot.h" | |
12 | |
13 class PrefRegistrySimple; | |
14 | |
15 namespace gfx { | |
16 class Rect; | |
17 } | |
18 | |
19 namespace chrome { | |
20 | |
21 void RegisterScreenshotPrefs(PrefRegistrySimple* registry); | |
22 | |
23 // Grabs a snapshot of the rectangle area |snapshot_bounds| with respect to the | |
24 // top left corner of the designated window and stores a PNG representation | |
25 // into a byte vector. On Windows, |window| may be NULL to grab a snapshot of | |
26 // the primary monitor. This takes into account calling user context (ie. checks | |
27 // policy settings if taking screenshots is allowed), and is intended to be used | |
28 // by browser code. If you need to take a screenshot for debugging purposes, | |
29 // consider using ui::GrabWindowSnapshot. | |
30 // Returns true if the operation is successful (ie. permitted). | |
31 // | |
32 // This synchronous function is deprecated. Use the async function instead. | |
33 bool GrabWindowSnapshotForUser(gfx::NativeWindow window, | |
34 std::vector<unsigned char>* png_representation, | |
35 const gfx::Rect& snapshot_bounds); | |
36 | |
37 } // namespace chrome | |
38 | |
39 #endif // CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ | |
OLD | NEW |