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 UI_BASE_SNAPSHOT_SNAPSHOT_H_ |
| 6 #define UI_BASE_SNAPSHOT_SNAPSHOT_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "ui/gfx/native_widget_types.h" |
| 11 |
| 12 namespace gfx { |
| 13 class Rect; |
| 14 } |
| 15 |
| 16 namespace ui { |
| 17 |
| 18 // Grabs a snapshot of the window/view. No security checks are done. |
| 19 // This is intended to be used for debugging purposes where no BrowserProcess |
| 20 // instance is available (ie. tests). DO NOT use in a result of user action. |
| 21 UI_EXPORT bool GrabWindowSnapshot( |
| 22 gfx::NativeWindow window, |
| 23 std::vector<unsigned char>* png_representation, |
| 24 const gfx::Rect& snapshot_bounds); |
| 25 |
| 26 UI_EXPORT bool GrabViewSnapshot( |
| 27 gfx::NativeView view, |
| 28 std::vector<unsigned char>* png_representation, |
| 29 const gfx::Rect& snapshot_bounds); |
| 30 |
| 31 } // namespace ui |
| 32 |
| 33 #endif // UI_BASE_SNAPSHOT_SNAPSHOT_H_ |
OLD | NEW |