| Index: base/gfx/size.cc
|
| ===================================================================
|
| --- base/gfx/size.cc (revision 14559)
|
| +++ base/gfx/size.cc (working copy)
|
| @@ -10,8 +10,16 @@
|
| #include <CoreGraphics/CGGeometry.h>
|
| #endif
|
|
|
| +#include "base/logging.h"
|
| +
|
| +
|
| namespace gfx {
|
|
|
| +Size::Size(int width, int height) {
|
| + set_width(width);
|
| + set_height(height);
|
| +}
|
| +
|
| #if defined(OS_WIN)
|
| SIZE Size::ToSIZE() const {
|
| SIZE s;
|
| @@ -25,4 +33,21 @@
|
| }
|
| #endif
|
|
|
| +void Size::set_width(int width) {
|
| + if (width < 0) {
|
| + NOTREACHED();
|
| + width = 0;
|
| + }
|
| + width_ = width;
|
| +}
|
| +
|
| +void Size::set_height(int height) {
|
| + if (height < 0) {
|
| + NOTREACHED();
|
| + height = 0;
|
| + }
|
| + height_ = height;
|
| +}
|
| +
|
| +
|
| } // namespace gfx
|
|
|