| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 TransformOrigin_h | 5 #ifndef TransformOrigin_h |
| 6 #define TransformOrigin_h | 6 #define TransformOrigin_h |
| 7 | 7 |
| 8 #include "platform/Length.h" | 8 #include "platform/Length.h" |
| 9 #include "wtf/Allocator.h" | 9 #include "platform/wtf/Allocator.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class TransformOrigin { | 13 class TransformOrigin { |
| 14 DISALLOW_NEW(); | 14 DISALLOW_NEW(); |
| 15 | 15 |
| 16 public: | 16 public: |
| 17 TransformOrigin(const Length& x, const Length& y, float z) | 17 TransformOrigin(const Length& x, const Length& y, float z) |
| 18 : x_(x), y_(y), z_(z) {} | 18 : x_(x), y_(y), z_(z) {} |
| 19 bool operator==(const TransformOrigin& o) const { | 19 bool operator==(const TransformOrigin& o) const { |
| 20 return x_ == o.x_ && y_ == o.y_ && z_ == o.z_; | 20 return x_ == o.x_ && y_ == o.y_ && z_ == o.z_; |
| 21 } | 21 } |
| 22 bool operator!=(const TransformOrigin& o) const { return !(*this == o); } | 22 bool operator!=(const TransformOrigin& o) const { return !(*this == o); } |
| 23 const Length& X() const { return x_; } | 23 const Length& X() const { return x_; } |
| 24 const Length& Y() const { return y_; } | 24 const Length& Y() const { return y_; } |
| 25 float Z() const { return z_; } | 25 float Z() const { return z_; } |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 Length x_; | 28 Length x_; |
| 29 Length y_; | 29 Length y_; |
| 30 float z_; | 30 float z_; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 } // namespace blink | 33 } // namespace blink |
| 34 | 34 |
| 35 #endif // TransformOrigin_h | 35 #endif // TransformOrigin_h |
| OLD | NEW |