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

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

Issue 8523022: Change snasphotting API to take in a bounds Rect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ 5 #ifndef CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_
6 #define CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ 6 #define CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class Rect; 14 class Rect;
15 } 15 }
16 16
17 namespace browser { 17 namespace browser {
18 18
19 // Grabs a snapshot of the designated window and stores a PNG representation 19 // Grabs a snapshot of the designated window and stores a PNG representation
20 // into a byte vector. Returns the image bounds. 20 // into a byte vector. Returns the image bounds.
21 gfx::Rect GrabWindowSnapshot(gfx::NativeWindow window, 21 gfx::Rect GrabWindowSnapshot(gfx::NativeWindow window,
22 std::vector<unsigned char>* png_representation); 22 std::vector<unsigned char>* png_representation);
23 23
24 // Grabs a snapshot of the rectangle area |snapshot_bounds| with respect to the
25 // top left corner of the designated window and stores a PNG representation
26 // into a byte vector. Returns the image bounds.
jonathan.backer 2011/11/11 14:41:20 Document that an empty rect means grab the whole r
27 gfx::Rect GrabWindowSnapshot(gfx::NativeWindow window,
28 std::vector<unsigned char>* png_representation,
29 gfx::Rect snapshot_bounds);
kkania 2011/11/11 17:06:31 const gfx::Rect& snapshot_bounds
24 } // namespace browser 30 } // namespace browser
25 31
26 #endif // CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_ 32 #endif // CHROME_BROWSER_UI_WINDOW_SNAPSHOT_WINDOW_SNAPSHOT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698