| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "platform/text/Hyphenation.h" |
| 6 |
| 7 #include "base/files/memory_mapped_file.h" |
| 8 #include "platform/PlatformExport.h" |
| 9 |
| 10 namespace base { |
| 11 class File; |
| 12 } // namespace base |
| 13 |
| 14 namespace android { |
| 15 class Hyphenator; |
| 16 } // namespace andorid |
| 17 |
| 18 namespace blink { |
| 19 |
| 20 class PLATFORM_EXPORT HyphenationMinikin : public Hyphenation { |
| 21 public: |
| 22 bool openDictionary(const AtomicString& locale); |
| 23 |
| 24 size_t lastHyphenLocation(const StringView& text, |
| 25 size_t beforeIndex) const override; |
| 26 Vector<size_t, 8> hyphenLocations(const StringView&) const override; |
| 27 |
| 28 static PassRefPtr<HyphenationMinikin> fromFileForTesting(base::File); |
| 29 |
| 30 private: |
| 31 bool openDictionary(base::File); |
| 32 |
| 33 std::vector<uint8_t> hyphenate(const StringView&) const; |
| 34 |
| 35 base::MemoryMappedFile m_file; |
| 36 std::unique_ptr<android::Hyphenator> m_hyphenator; |
| 37 }; |
| 38 |
| 39 } // namespace blink |
| OLD | NEW |