OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/gfx/size.h" | 5 #include "ui/gfx/size.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
13 #include "ui/gfx/size_base.h" | 13 #include "ui/gfx/size_base.h" |
14 #include "ui/gfx/size_base_impl.h" | |
15 | 14 |
16 namespace gfx { | 15 namespace gfx { |
17 | 16 |
18 template class SizeBase<Size, int>; | 17 template class SizeBase<Size, int>; |
19 | 18 |
20 Size::Size() : SizeBase<Size, int>(0, 0) {} | 19 Size::Size() : SizeBase<Size, int>(0, 0) {} |
21 | 20 |
22 Size::Size(int width, int height) : SizeBase<Size, int>(0, 0) { | 21 Size::Size(int width, int height) : SizeBase<Size, int>(0, 0) { |
23 set_width(width); | 22 set_width(width); |
24 set_height(height); | 23 set_height(height); |
(...skipping 25 matching lines...) Expand all Loading... |
50 CGSize Size::ToCGSize() const { | 49 CGSize Size::ToCGSize() const { |
51 return CGSizeMake(width(), height()); | 50 return CGSizeMake(width(), height()); |
52 } | 51 } |
53 #endif | 52 #endif |
54 | 53 |
55 std::string Size::ToString() const { | 54 std::string Size::ToString() const { |
56 return base::StringPrintf("%dx%d", width(), height()); | 55 return base::StringPrintf("%dx%d", width(), height()); |
57 } | 56 } |
58 | 57 |
59 } // namespace gfx | 58 } // namespace gfx |
OLD | NEW |