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