license.bot | f003cfe | 2008-08-24 09:55:55 +0900 | [diff] [blame^] | 1 | // Copyright (c) 2006-2008 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. |
initial.commit | 3f4a732 | 2008-07-27 06:49:38 +0900 | [diff] [blame] | 4 | |
| 5 | #include "base/gfx/size.h" |
| 6 | |
avi@google.com | 8227724 | 2008-08-07 05:38:29 +0900 | [diff] [blame] | 7 | #if defined(OS_WIN) |
initial.commit | 3f4a732 | 2008-07-27 06:49:38 +0900 | [diff] [blame] | 8 | #include <windows.h> |
avi@google.com | 8227724 | 2008-08-07 05:38:29 +0900 | [diff] [blame] | 9 | #elif defined(OS_MACOSX) |
| 10 | #include <CoreGraphics/CGGeometry.h> |
| 11 | #endif |
initial.commit | 3f4a732 | 2008-07-27 06:49:38 +0900 | [diff] [blame] | 12 | |
| 13 | namespace gfx { |
| 14 | |
avi@google.com | 8227724 | 2008-08-07 05:38:29 +0900 | [diff] [blame] | 15 | #if defined(OS_WIN) |
initial.commit | 3f4a732 | 2008-07-27 06:49:38 +0900 | [diff] [blame] | 16 | SIZE Size::ToSIZE() const { |
| 17 | SIZE s; |
| 18 | s.cx = width_; |
| 19 | s.cy = height_; |
| 20 | return s; |
| 21 | } |
avi@google.com | 8227724 | 2008-08-07 05:38:29 +0900 | [diff] [blame] | 22 | #elif defined(OS_MACOSX) |
| 23 | CGSize Size::ToCGSize() const { |
| 24 | return CGSizeMake(width_, height_); |
initial.commit | 3f4a732 | 2008-07-27 06:49:38 +0900 | [diff] [blame] | 25 | } |
avi@google.com | 8227724 | 2008-08-07 05:38:29 +0900 | [diff] [blame] | 26 | #endif |
initial.commit | 3f4a732 | 2008-07-27 06:49:38 +0900 | [diff] [blame] | 27 | |
| 28 | } // namespace gfx |
license.bot | f003cfe | 2008-08-24 09:55:55 +0900 | [diff] [blame^] | 29 | |