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

Unified Diff: ui/snapshot/snapshot_win.h

Issue 13926006: Add ui::GrabDesktopSnapshot for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Always include GrabHwndSnapshot Created 7 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
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..e521484369cb19af24d9fb2be78643e303c959c8
--- /dev/null
+++ b/ui/snapshot/snapshot_win.h
@@ -0,0 +1,32 @@
+// Copyright 2013 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 <vector>
+
+#include "ui/snapshot/snapshot_export.h"
+
+namespace gfx {
+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_EXPORT bool GrabHwndSnapshot(
+ HWND window_handle,
+ const gfx::Rect& snapshot_bounds,
+ std::vector<unsigned char>* png_representation);
+
+} // namespace internal
+} // namespace ui
+
+#endif // UI_SNAPSHOT_SNAPSHOT_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698