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

Unified Diff: content/public/browser/window_util.h

Issue 11399002: Implemented GetWindowSnapshot on RenderViewImpl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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: content/public/browser/window_util.h
diff --git a/content/public/browser/window_util.h b/content/public/browser/window_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..2305d54b4f1ed065e5e9537218050a69c974a03c
--- /dev/null
+++ b/content/public/browser/window_util.h
@@ -0,0 +1,36 @@
+// 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 CONTENT_PUBLIC_BROWSER_WINDOW_UTIL_H_
+#define CONTENT_PUBLIC_BROWSER_WINDOW_UTIL_H_
+
+#include <vector>
+
+#include "ui/gfx/native_widget_types.h"
+
+class PrefService;
jam 2012/11/09 02:21:29 nuke
+
+namespace gfx {
+class Rect;
+}
+
+namespace content {
+
+// Like chrome::GrabWindowSnapshotForUser, but does not perform additional
jam 2012/11/09 02:21:29 content shouldn't refer to chrome even in comments
+// security checks - just grabs a snapshot. 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.
+bool GrabWindowSnapshot(
+ gfx::NativeWindow window,
+ std::vector<unsigned char>* png_representation,
+ const gfx::Rect& snapshot_bounds);
+
+bool GrabViewSnapshot(
+ gfx::NativeView view,
+ std::vector<unsigned char>* png_representation,
+ const gfx::Rect& snapshot_bounds);
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_WINDOW_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698