| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/test/chromedriver/basic_types.h" | 5 #include "chrome/test/chromedriver/basic_types.h" |
| 6 | 6 |
| 7 WebPoint::WebPoint() : x(0), y(0) {} | 7 WebPoint::WebPoint() : x(0), y(0) {} |
| 8 | 8 |
| 9 WebPoint::WebPoint(int x, int y) : x(x), y(y) {} | 9 WebPoint::WebPoint(int x, int y) : x(x), y(y) {} |
| 10 | 10 |
| 11 WebPoint::~WebPoint() {} | 11 WebPoint::~WebPoint() {} |
| 12 | 12 |
| 13 void WebPoint::offset(int x_, int y_) { | 13 void WebPoint::Offset(int x_, int y_) { |
| 14 x += x_; | 14 x += x_; |
| 15 y += y_; | 15 y += y_; |
| 16 } | 16 } |
| 17 | 17 |
| 18 WebSize::WebSize() : width(0), height(0) {} | 18 WebSize::WebSize() : width(0), height(0) {} |
| 19 | 19 |
| 20 WebSize::WebSize(int width, int height) : width(width), height(height) {} | 20 WebSize::WebSize(int width, int height) : width(width), height(height) {} |
| 21 | 21 |
| 22 WebSize::~WebSize() {} | 22 WebSize::~WebSize() {} |
| 23 | 23 |
| 24 WebRect::WebRect() : origin(0, 0), size(0, 0) {} | 24 WebRect::WebRect() : origin(0, 0), size(0, 0) {} |
| 25 | 25 |
| 26 WebRect::WebRect(int x, int y, int width, int height) | 26 WebRect::WebRect(int x, int y, int width, int height) |
| 27 : origin(x, y), size(width, height) {} | 27 : origin(x, y), size(width, height) {} |
| 28 | 28 |
| 29 WebRect::WebRect(const WebPoint& origin, const WebSize& size) | 29 WebRect::WebRect(const WebPoint& origin, const WebSize& size) |
| 30 : origin(origin), size(size) {} | 30 : origin(origin), size(size) {} |
| 31 | 31 |
| 32 WebRect::~WebRect() {} | 32 WebRect::~WebRect() {} |
| 33 | 33 |
| 34 int WebRect::x() { return origin.x; } | 34 int WebRect::X() const { return origin.x; } |
| 35 | 35 |
| 36 int WebRect::y() { return origin.y; } | 36 int WebRect::Y() const { return origin.y; } |
| 37 | 37 |
| 38 int WebRect::width() { return size.width; } | 38 int WebRect::Width() const { return size.width; } |
| 39 | 39 |
| 40 int WebRect::height() { return size.height; } | 40 int WebRect::Height() const { return size.height; } |
| OLD | NEW |