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