Index: ui/snapshot/snapshot_win.h |
diff --git a/ui/snapshot/snapshot_win.h b/ui/snapshot/snapshot_win.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b290414a8f80b2562fe4f0fa84c693f8ccd2861d |
--- /dev/null |
+++ b/ui/snapshot/snapshot_win.h |
@@ -0,0 +1,35 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_SNAPSHOT_SNAPSHOT_WIN_H_ |
+#define UI_SNAPSHOT_SNAPSHOT_WIN_H_ |
+ |
+#include <windows.h> |
+ |
+#include "ui/snapshot/snapshot_export.h" |
+ |
+namespace gfx { |
+class Image; |
+class Rect; |
+} |
+ |
+namespace ui { |
+namespace internal { |
+ |
+// Grabs a snapshot of the desktop. No security checks are done. This is |
+// intended to be used for debugging purposes where no BrowserProcess instance |
+// is available (ie. tests). DO NOT use in a result of user action. |
sky
2017/03/23 03:29:13
Can you put this file in a target that is not part
|
+// snapshot_bounds is the area relative to clip_rect that should be captured. |
+// Areas outside clip_rect are filled white. clip_rect is relative to the |
+// client area of the window, and snapshot_bounds is relative to the |
+// clip_rect. |
+SNAPSHOT_EXPORT bool GrabHwndSnapshot(HWND window_handle, |
+ const gfx::Rect& snapshot_bounds, |
+ const gfx::Rect& clip_rect, |
+ gfx::Image* image); |
+ |
+} // namespace internal |
+} // namespace ui |
+ |
+#endif // UI_SNAPSHOT_SNAPSHOT_WIN_H_ |