Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: third_party/WebKit/Source/platform/text/Hyphenation.h

Issue 1917423002: Add Hyphenation class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef Hyphenation_h
6 #define Hyphenation_h
7
8 #include "platform/PlatformExport.h"
9 #include "wtf/Forward.h"
10 #include "wtf/HashMap.h"
11 #include "wtf/RefCounted.h"
12 #include "wtf/text/AtomicStringHash.h"
13 #include "wtf/text/StringHash.h"
14
15 namespace blink {
16
17 class StringView;
18
19 class PLATFORM_EXPORT Hyphenation : public RefCounted<Hyphenation> {
20 public:
21 virtual ~Hyphenation() {}
22
23 static Hyphenation* get(const AtomicString& locale);
24
25 virtual size_t lastHyphenLocation(const StringView&, size_t beforeIndex, con st AtomicString& locale) const = 0;
26
27 static void setForTesting(const AtomicString& locale, PassRefPtr<Hyphenation >);
28 static void clearForTesting();
29
30 private:
31 using HyphenationMap = HashMap<AtomicString, RefPtr<Hyphenation>, CaseFoldin gHash>;
32
33 static HyphenationMap& getHyphenationMap();
34 static PassRefPtr<Hyphenation> platformGetHyphenation(const AtomicString& lo cale);
35 };
36
37 } // namespace blink
38
39 #endif // Hyphenation_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/blink_platform.gypi ('k') | third_party/WebKit/Source/platform/text/Hyphenation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698