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.
9 #elif defined(OS_MACOSX)
10 #include <CoreGraphics/CGGeometry.h>
15 #include "base/logging.h"
19 Size::Size(int width
, int height
) {
24 #if defined(OS_MACOSX)
25 Size::Size(const CGSize
& s
) {
30 Size
& Size::operator=(const CGSize
& s
) {
38 SIZE
Size::ToSIZE() const {
44 #elif defined(OS_MACOSX)
45 CGSize
Size::ToCGSize() const {
46 return CGSizeMake(width_
, height_
);
50 void Size::set_width(int width
) {
52 NOTREACHED() << "negative width:" << width
;
58 void Size::set_height(int height
) {
60 NOTREACHED() << "negative height:" << height
;
66 std::ostream
& operator<<(std::ostream
& out
, const gfx::Size
& s
) {
67 return out
<< s
.width() << "x" << s
.height();