| 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..95c1b870b35edfc6c2da9a66fe03e6f8cf907080
|
| --- /dev/null
|
| +++ b/content/public/browser/window_util.h
|
| @@ -0,0 +1,33 @@
|
| +// 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"
|
| +
|
| +namespace gfx {
|
| +class Rect;
|
| +}
|
| +
|
| +namespace content {
|
| +
|
| +// 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.
|
| +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_
|
|
|