1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ 6 #define CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ 7 #pragma once 8 9 #include <vector> 10 11 #include "ui/gfx/native_widget_types.h" 12 13 namespace gfx { 14 class Rect; 15 } 16 17 namespace browser { 18 19 // Grabs a snapshot of the designated window and stores a PNG representation 20 // into a byte vector. Returns the image bounds. 21 gfx::Rect GrabWindowSnapshot(gfx::NativeWindow window, 22 std::vector<unsigned char>* png_representation); 23 24 } // namespace browser 25 26 #endif // CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ 27