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