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

Side by Side Diff: chrome/browser/ui/window_snapshot/window_snapshot_mac.mm

Issue 6312156: Change includes of gfx/* to ui/gfx/* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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
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 #include "chrome/browser/ui/window_snapshot/window_snapshot.h" 5 #include "chrome/browser/ui/window_snapshot/window_snapshot.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
11 #include "base/scoped_nsobject.h" 11 #include "base/scoped_nsobject.h"
12 #include "gfx/rect.h" 12 #include "ui/gfx/rect.h"
13 13
14 namespace browser { 14 namespace browser {
15 15
16 gfx::Rect GrabWindowSnapshot(gfx::NativeWindow window, 16 gfx::Rect GrabWindowSnapshot(gfx::NativeWindow window,
17 std::vector<unsigned char>* png_representation) { 17 std::vector<unsigned char>* png_representation) {
18 png_representation->clear(); 18 png_representation->clear();
19 19
20 // Make sure to grab the "window frame" view so we get current tab + 20 // Make sure to grab the "window frame" view so we get current tab +
21 // tabstrip. 21 // tabstrip.
22 NSView* view = [[window contentView] superview]; 22 NSView* view = [[window contentView] superview];
(...skipping 12 matching lines...) Expand all
35 return gfx::Rect(); 35 return gfx::Rect();
36 36
37 png_representation->assign(buf, buf + length); 37 png_representation->assign(buf, buf + length);
38 DCHECK(png_representation->size() > 0); 38 DCHECK(png_representation->size() > 0);
39 39
40 return gfx::Rect(static_cast<int>([rep pixelsWide]), 40 return gfx::Rect(static_cast<int>([rep pixelsWide]),
41 static_cast<int>([rep pixelsHigh])); 41 static_cast<int>([rep pixelsHigh]));
42 } 42 }
43 43
44 } // namespace browser 44 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/window_snapshot/window_snapshot.h ('k') | chrome/browser/ui/window_snapshot/window_snapshot_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698