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

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

Issue 9773024: This patch implements Chromium's Aura gesture recognizer in terms of utouch-grail and utouch-frame … (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 8 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
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 #elif defined(OS_MACOSX) 9 #elif defined(OS_MACOSX)
10 #include <CoreGraphics/CGGeometry.h> 10 #include <CoreGraphics/CGGeometry.h>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 return s; 45 return s;
46 } 46 }
47 #elif defined(OS_MACOSX) 47 #elif defined(OS_MACOSX)
48 CGSize Size::ToCGSize() const { 48 CGSize Size::ToCGSize() const {
49 return CGSizeMake(width_, height_); 49 return CGSizeMake(width_, height_);
50 } 50 }
51 #endif 51 #endif
52 52
53 void Size::set_width(int width) { 53 void Size::set_width(int width) {
54 if (width < 0) { 54 if (width < 0) {
55 NOTREACHED() << "negative width:" << width; 55 // NOTREACHED() << "negative width:" << width;
tfarina 2012/03/28 16:16:04 please, revert this change.
56 width = 0; 56 width = 0;
57 } 57 }
58 width_ = width; 58 width_ = width;
59 } 59 }
60 60
61 void Size::set_height(int height) { 61 void Size::set_height(int height) {
62 if (height < 0) { 62 if (height < 0) {
63 NOTREACHED() << "negative height:" << height; 63 NOTREACHED() << "negative height:" << height;
64 height = 0; 64 height = 0;
65 } 65 }
66 height_ = height; 66 height_ = height;
67 } 67 }
68 68
69 std::string Size::ToString() const { 69 std::string Size::ToString() const {
70 return base::StringPrintf("%dx%d", width_, height_); 70 return base::StringPrintf("%dx%d", width_, height_);
71 } 71 }
72 72
73 } // namespace gfx 73 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698