| OLD | NEW |
| 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 #ifndef CC_STUBS_INTSIZE_H_ | 5 #ifndef CC_STUBS_INTSIZE_H_ |
| 6 #define CC_STUBS_INTSIZE_H_ | 6 #define CC_STUBS_INTSIZE_H_ |
| 7 | 7 |
| 8 #if INSIDE_WEBKIT_BUILD | 8 #if INSIDE_WEBKIT_BUILD |
| 9 #include "Source/WebCore/platform/graphics/IntSize.h" | 9 #include "Source/WebCore/platform/graphics/IntSize.h" |
| 10 #else | 10 #else |
| 11 #include "third_party/WebKit/Source/WebCore/platform/graphics/IntSize.h" | 11 #include "third_party/WebKit/Source/WebCore/platform/graphics/IntSize.h" |
| 12 #endif | 12 #endif |
| 13 #include <public/WebSize.h> |
| 13 | 14 |
| 14 namespace cc { | 15 namespace cc { |
| 15 | 16 |
| 16 class IntSize : public WebCore::IntSize { | 17 class IntSize : public WebCore::IntSize { |
| 17 public: | 18 public: |
| 18 IntSize() { } | 19 IntSize() { } |
| 19 | 20 |
| 20 IntSize(int width, int height) | 21 IntSize(int width, int height) |
| 21 : WebCore::IntSize(width, height) | 22 : WebCore::IntSize(width, height) |
| 22 { | 23 { |
| 23 } | 24 } |
| 24 | 25 |
| 25 IntSize(WebCore::IntSize size) | 26 IntSize(WebCore::IntSize size) |
| 26 : WebCore::IntSize(size.width(), size.height()) | 27 : WebCore::IntSize(size.width(), size.height()) |
| 27 { | 28 { |
| 28 | 29 |
| 29 } | 30 } |
| 31 |
| 32 IntSize(WebKit::WebSize point) |
| 33 : WebCore::IntSize(point.width, point.height) |
| 34 { |
| 35 } |
| 36 |
| 37 operator WebKit::WebSize() const |
| 38 { |
| 39 return WebKit::WebSize(width(), height()); |
| 40 } |
| 30 }; | 41 }; |
| 31 | 42 |
| 32 } | 43 } |
| 33 | 44 |
| 34 #endif | 45 #endif |
| OLD | NEW |