| Index: ui/base/snapshot/snapshot.h
|
| diff --git a/ui/base/snapshot/snapshot.h b/ui/base/snapshot/snapshot.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bdaaafd00e66fba74dbdfb96f42304af665e5966
|
| --- /dev/null
|
| +++ b/ui/base/snapshot/snapshot.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 UI_BASE_SNAPSHOT_SNAPSHOT_H_
|
| +#define UI_BASE_SNAPSHOT_SNAPSHOT_H_
|
| +
|
| +#include <vector>
|
| +
|
| +#include "ui/gfx/native_widget_types.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.
|
| +UI_EXPORT bool GrabWindowSnapshot(
|
| + gfx::NativeWindow window,
|
| + std::vector<unsigned char>* png_representation,
|
| + const gfx::Rect& snapshot_bounds);
|
| +
|
| +UI_EXPORT bool GrabViewSnapshot(
|
| + gfx::NativeView view,
|
| + std::vector<unsigned char>* png_representation,
|
| + const gfx::Rect& snapshot_bounds);
|
| +
|
| +} // namespace ui
|
| +
|
| +#endif // UI_BASE_SNAPSHOT_SNAPSHOT_H_
|
|
|