OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CC_STUBS_INTSIZE_H_ | |
6 #define CC_STUBS_INTSIZE_H_ | |
7 | |
8 #if INSIDE_WEBKIT_BUILD | |
9 #include "Source/WebCore/platform/graphics/IntSize.h" | |
10 #else | |
11 #include "third_party/WebKit/Source/WebCore/platform/graphics/IntSize.h" | |
12 #endif | |
13 #include "ui/gfx/size.h" | |
14 #include "ui/gfx/vector2d.h" | |
15 | |
16 namespace cc { | |
17 | |
18 class IntSize : public WebCore::IntSize { | |
19 public: | |
20 IntSize() { } | |
21 | |
22 IntSize(int width, int height) | |
23 : WebCore::IntSize(width, height) | |
24 { | |
25 } | |
26 | |
27 IntSize(WebCore::IntSize size) | |
28 : WebCore::IntSize(size.width(), size.height()) | |
29 { | |
30 | |
31 } | |
32 | |
33 explicit IntSize(gfx::Size size) | |
34 : WebCore::IntSize(size.width(), size.height()) | |
35 { | |
36 } | |
37 | |
38 explicit IntSize(gfx::Vector2d vector) | |
39 : WebCore::IntSize(vector.x(), vector.y()) | |
40 { | |
41 } | |
42 | |
43 operator gfx::Size() const { return gfx::Size(width(), height()); } | |
44 | |
45 operator gfx::Vector2d() const { return gfx::Vector2d(width(), height()); } | |
46 }; | |
47 | |
48 } | |
49 | |
50 #endif | |
OLD | NEW |