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

Unified Diff: ui/snapshot/snapshot_win.h

Issue 2752373002: Use PrintWindow() to implement snapshots on windows 8.1+ (Closed)
Patch Set: rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/snapshot/snapshot_aura.cc ('k') | ui/snapshot/snapshot_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..351d8d898bd0b269dd4e211cd3992c76eb0e49ad
--- /dev/null
+++ b/ui/snapshot/snapshot_win.h
@@ -0,0 +1,36 @@
+// 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.
+//
+// snapshot_bounds_in_pixels is the area relative to clip_rect_in_pixels that
+// should be captured. Areas outside clip_rect_in_pixels are filled white.
+// clip_rect_in_pixels is relative to the client area of the window.
+SNAPSHOT_EXPORT bool GrabHwndSnapshot(
+ HWND window_handle,
+ const gfx::Rect& snapshot_bounds_in_pixels,
+ const gfx::Rect& clip_rect_in_pixels,
+ gfx::Image* image);
+
+} // namespace internal
+} // namespace ui
+
+#endif // UI_SNAPSHOT_SNAPSHOT_WIN_H_
« no previous file with comments | « ui/snapshot/snapshot_aura.cc ('k') | ui/snapshot/snapshot_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698