| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 PaintSize_h | 5 #ifndef PaintSize_h |
| 6 #define PaintSize_h | 6 #define PaintSize_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "platform/bindings/ScriptWrappable.h" |
| 9 #include "platform/geometry/IntSize.h" | 9 #include "platform/geometry/IntSize.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class PaintSize : public GarbageCollectedFinalized<PaintSize>, | 14 class PaintSize : public GarbageCollectedFinalized<PaintSize>, |
| 15 public ScriptWrappable { | 15 public ScriptWrappable { |
| 16 WTF_MAKE_NONCOPYABLE(PaintSize); | 16 WTF_MAKE_NONCOPYABLE(PaintSize); |
| 17 DEFINE_WRAPPERTYPEINFO(); | 17 DEFINE_WRAPPERTYPEINFO(); |
| 18 | 18 |
| 19 public: | 19 public: |
| 20 static PaintSize* Create(IntSize size) { return new PaintSize(size); } | 20 static PaintSize* Create(IntSize size) { return new PaintSize(size); } |
| 21 virtual ~PaintSize() {} | 21 virtual ~PaintSize() {} |
| 22 | 22 |
| 23 int width() const { return size_.Width(); } | 23 int width() const { return size_.Width(); } |
| 24 int height() const { return size_.Height(); } | 24 int height() const { return size_.Height(); } |
| 25 | 25 |
| 26 DEFINE_INLINE_TRACE() {} | 26 DEFINE_INLINE_TRACE() {} |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 explicit PaintSize(IntSize size) : size_(size) {} | 29 explicit PaintSize(IntSize size) : size_(size) {} |
| 30 | 30 |
| 31 IntSize size_; | 31 IntSize size_; |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 } // namespace blink | 34 } // namespace blink |
| 35 | 35 |
| 36 #endif // PaintSize_h | 36 #endif // PaintSize_h |
| OLD | NEW |