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

Side by Side Diff: ui/window_snapshot/window_snapshot.h

Issue 10830135: Revert 149604 - Support calling GrabWindowSnapshot when no BrowserProcess instance is avaliable (eg… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/ui.gyp ('k') | ui/window_snapshot/window_snapshot_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_
6 #define UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_
7
8 #include <vector>
9
10 #include "ui/base/ui_export.h"
11 #include "ui/gfx/native_widget_types.h"
12
13 namespace gfx {
14 class Rect;
15 }
16
17 namespace ui {
18
19 // Grabs a snapshot of the rectangle area |snapshot_bounds| with respect to the
20 // top left corner of the designated window and stores a PNG representation
21 // into a byte vector. On Windows, |window| may be NULL to grab a snapshot of
22 // the primary monitor. DO NOT use in browser code. Screenshots initiated by
23 // user action should be taken with chrome::GrabWindowSnapshot
24 // (chrome/browser/ui/window_snapshot/window_snapshot.cc), so user context is
25 // taken into account (eg. policy settings are checked).
26 // Returns true if the operation is successful.
27 UI_EXPORT bool GrabWindowSnapshot(
28 gfx::NativeWindow window,
29 std::vector<unsigned char>* png_representation,
30 const gfx::Rect& snapshot_bounds);
31
32 } // namespace chrome
33
34 #endif // UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « ui/ui.gyp ('k') | ui/window_snapshot/window_snapshot_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698