OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 EmptyOffsetMappingBuilder_h | 5 #ifndef EmptyOffsetMappingBuilder_h |
6 #define EmptyOffsetMappingBuilder_h | 6 #define EmptyOffsetMappingBuilder_h |
7 | 7 |
8 #include "platform/wtf/Allocator.h" | 8 #include "platform/wtf/Allocator.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 // A mock class providing all APIs of an offset mapping builder, but not doing | 12 // A mock class providing all APIs of an offset mapping builder, but not doing |
13 // anything. For templates functions/classes that can optionally create an | 13 // anything. For templates functions/classes that can optionally create an |
14 // offset mapping, this mock class is passed to create an instantiation that | 14 // offset mapping, this mock class is passed to create an instantiation that |
15 // does not create any offset mapping. | 15 // does not create any offset mapping. |
16 class EmptyOffsetMappingBuilder { | 16 class EmptyOffsetMappingBuilder { |
17 STACK_ALLOCATED(); | 17 STACK_ALLOCATED(); |
18 | 18 |
19 public: | 19 public: |
20 EmptyOffsetMappingBuilder() = default; | 20 EmptyOffsetMappingBuilder() = default; |
| 21 void AppendIdentityMapping(unsigned) {} |
| 22 void AppendCollapsedMapping(unsigned) {} |
| 23 void CollapseTrailingSpace(unsigned) {} |
21 | 24 |
22 private: | 25 private: |
23 DISALLOW_COPY_AND_ASSIGN(EmptyOffsetMappingBuilder); | 26 DISALLOW_COPY_AND_ASSIGN(EmptyOffsetMappingBuilder); |
24 }; | 27 }; |
25 | 28 |
26 } // namespace blink | 29 } // namespace blink |
27 | 30 |
28 #endif // EmptyOffsetMappingBuilder_h | 31 #endif // EmptyOffsetMappingBuilder_h |
OLD | NEW |