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

Unified Diff: ui/snapshot/snapshot.h

Issue 11399002: Implemented GetWindowSnapshot on RenderViewImpl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added stub methods for iOS Created 8 years 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/DEPS ('k') | ui/snapshot/snapshot.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/snapshot/snapshot.h
diff --git a/ui/snapshot/snapshot.h b/ui/snapshot/snapshot.h
new file mode 100644
index 0000000000000000000000000000000000000000..356309d86ac6cc10f48bf8c9f716729db47cce41
--- /dev/null
+++ b/ui/snapshot/snapshot.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 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_H_
+#define UI_SNAPSHOT_SNAPSHOT_H_
+
+#include <vector>
+
+#include "ui/gfx/native_widget_types.h"
+#include "ui/snapshot/snapshot_export.h"
+
+namespace gfx {
+class Rect;
+}
+
+namespace ui {
+
+// Grabs a snapshot of the window/view. 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 GrabWindowSnapshot(
+ gfx::NativeWindow window,
+ std::vector<unsigned char>* png_representation,
+ const gfx::Rect& snapshot_bounds);
+
+SNAPSHOT_EXPORT bool GrabViewSnapshot(
+ gfx::NativeView view,
+ std::vector<unsigned char>* png_representation,
+ const gfx::Rect& snapshot_bounds);
+
+} // namespace ui
+
+#endif // UI_SNAPSHOT_SNAPSHOT_H_
« no previous file with comments | « ui/snapshot/DEPS ('k') | ui/snapshot/snapshot.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698