| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 LineLayoutAPIShim_h | 5 #ifndef LineLayoutAPIShim_h |
| 6 #define LineLayoutAPIShim_h | 6 #define LineLayoutAPIShim_h |
| 7 | 7 |
| 8 #include "core/layout/api/LineLayoutItem.h" | 8 #include "core/layout/api/LineLayoutItem.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class LayoutObject; | 12 class LayoutObject; |
| 13 | 13 |
| 14 // TODO(pilgrim): Remove this kludge once clients have a real API and no longer
need access to the underlying LayoutObject. | 14 // TODO(pilgrim): Remove this kludge once clients have a real API and no longer |
| 15 // need access to the underlying LayoutObject. |
| 15 class LineLayoutAPIShim { | 16 class LineLayoutAPIShim { |
| 16 public: | 17 public: |
| 17 static LayoutObject* layoutObjectFrom(LineLayoutItem item) { | 18 static LayoutObject* layoutObjectFrom(LineLayoutItem item) { |
| 18 return item.layoutObject(); | 19 return item.layoutObject(); |
| 19 } | 20 } |
| 20 | 21 |
| 21 static const LayoutObject* constLayoutObjectFrom(LineLayoutItem item) { | 22 static const LayoutObject* constLayoutObjectFrom(LineLayoutItem item) { |
| 22 return item.layoutObject(); | 23 return item.layoutObject(); |
| 23 } | 24 } |
| 24 }; | 25 }; |
| 25 | 26 |
| 26 } // namespace blink | 27 } // namespace blink |
| 27 | 28 |
| 28 #endif // LineLayoutAPIShim_h | 29 #endif // LineLayoutAPIShim_h |
| OLD | NEW |