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

Unified Diff: base/mac_util.mm

Issue 2068004: Commiting http://codereview.chromium.org/2017007/show on behalf of rkc@chromi... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: base/mac_util.mm
===================================================================
--- base/mac_util.mm (revision 47222)
+++ base/mac_util.mm (working copy)
@@ -244,7 +244,8 @@
}
void GrabWindowSnapshot(NSWindow* window,
- std::vector<unsigned char>* png_representation) {
+ std::vector<unsigned char>* png_representation,
+ int* width, int* height) {
// Make sure to grab the "window frame" view so we get current tab +
// tabstrip.
NSView* view = [[window contentView] superview];
@@ -255,6 +256,8 @@
const unsigned char* buf = static_cast<const unsigned char*>([data bytes]);
NSUInteger length = [data length];
if (buf != NULL && length > 0){
+ *width = static_cast<int>([rep pixelsWide]);
+ *height = static_cast<int>([rep pixelsHigh]);
png_representation->assign(buf, buf + length);
DCHECK(png_representation->size() > 0);
}
« no previous file with comments | « base/mac_util.h ('k') | base/mac_util_unittest.mm » ('j') | chrome/chrome_browser.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698