- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / chromedriver / basic_types.cc
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
3 // found in the LICENSE file.
4
5 #include "chrome/test/chromedriver/basic_types.h"
6
7 WebPoint::WebPoint() : x(0), y(0) {}
8
9 WebPoint::WebPoint(int x, int y) : x(x), y(y) {}
10
11 WebPoint::~WebPoint() {}
12
13 void WebPoint::Offset(int x_, int y_) {
14   x += x_;
15   y += y_;
16 }
17
18 WebSize::WebSize() : width(0), height(0) {}
19
20 WebSize::WebSize(int width, int height) : width(width), height(height) {}
21
22 WebSize::~WebSize() {}
23
24 WebRect::WebRect() : origin(0, 0), size(0, 0) {}
25
26 WebRect::WebRect(int x, int y, int width, int height)
27     : origin(x, y), size(width, height) {}
28
29 WebRect::WebRect(const WebPoint& origin, const WebSize& size)
30     : origin(origin), size(size) {}
31
32 WebRect::~WebRect() {}
33
34 int WebRect::X() const { return origin.x; }
35
36 int WebRect::Y() const { return origin.y; }
37
38 int WebRect::Width() const { return size.width; }
39
40 int WebRect::Height() const { return size.height; }