blob: 8b815c830cac272b9867d619d86c3d531c1ce5ab [file] [log] [blame]
license.botf003cfe2008-08-24 09:55:55 +09001// 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.commit3f4a7322008-07-27 06:49:38 +09004
5#include "base/gfx/size.h"
6
avi@google.com82277242008-08-07 05:38:29 +09007#if defined(OS_WIN)
initial.commit3f4a7322008-07-27 06:49:38 +09008#include <windows.h>
avi@google.com82277242008-08-07 05:38:29 +09009#elif defined(OS_MACOSX)
10#include <CoreGraphics/CGGeometry.h>
11#endif
initial.commit3f4a7322008-07-27 06:49:38 +090012
13namespace gfx {
14
avi@google.com82277242008-08-07 05:38:29 +090015#if defined(OS_WIN)
initial.commit3f4a7322008-07-27 06:49:38 +090016SIZE Size::ToSIZE() const {
17 SIZE s;
18 s.cx = width_;
19 s.cy = height_;
20 return s;
21}
avi@google.com82277242008-08-07 05:38:29 +090022#elif defined(OS_MACOSX)
23CGSize Size::ToCGSize() const {
24 return CGSizeMake(width_, height_);
initial.commit3f4a7322008-07-27 06:49:38 +090025}
avi@google.com82277242008-08-07 05:38:29 +090026#endif
initial.commit3f4a7322008-07-27 06:49:38 +090027
28} // namespace gfx
license.botf003cfe2008-08-24 09:55:55 +090029