Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2040)

Side by Side Diff: ui/gfx/size.cc

Issue 10996037: Do not convert from RectF to Rect by flooring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing mac build. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/safe_floor_ceil.cc ('k') | ui/gfx/size_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ui/gfx/safe_floor_ceil.cc ('k') | ui/gfx/size_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698