1 // Copyright (c) 2012 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.
5 #include "ui/gfx/size.h"
11 #include "base/logging.h"
12 #include "base/stringprintf.h"
13 #include "ui/gfx/size_base.h"
17 template class SizeBase
<Size
, int>;
19 Size::Size() : SizeBase
<Size
, int>(0, 0) {}
21 Size::Size(int width
, int height
) : SizeBase
<Size
, int>(0, 0) {
26 #if defined(OS_MACOSX)
27 Size::Size(const CGSize
& s
) : SizeBase
<Size
, int>(0, 0) {
32 Size
& Size::operator=(const CGSize
& s
) {
42 SIZE
Size::ToSIZE() const {
48 #elif defined(OS_MACOSX)
49 CGSize
Size::ToCGSize() const {
50 return CGSizeMake(width(), height());
54 std::string
Size::ToString() const {
55 return base::StringPrintf("%dx%d", width(), height());