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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/SymbolsIterator.h

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 SymbolsIterator_h 5 #ifndef SymbolsIterator_h
6 #define SymbolsIterator_h 6 #define SymbolsIterator_h
7 7
8 #include "platform/fonts/FontFallbackPriority.h" 8 #include "platform/fonts/FontFallbackPriority.h"
9 #include "platform/fonts/FontOrientation.h" 9 #include "platform/fonts/FontOrientation.h"
10 #include "platform/fonts/ScriptRunIterator.h" 10 #include "platform/fonts/ScriptRunIterator.h"
11 #include "platform/fonts/UTF16TextIterator.h" 11 #include "platform/fonts/UTF16TextIterator.h"
12 #include "wtf/Allocator.h" 12 #include "wtf/Allocator.h"
13 #include "wtf/Noncopyable.h" 13 #include "wtf/Noncopyable.h"
14 #include <memory>
15 14
16 namespace blink { 15 namespace blink {
17 16
18 class PLATFORM_EXPORT SymbolsIterator { 17 class PLATFORM_EXPORT SymbolsIterator {
19 USING_FAST_MALLOC(SymbolsIterator); 18 USING_FAST_MALLOC(SymbolsIterator);
20 WTF_MAKE_NONCOPYABLE(SymbolsIterator); 19 WTF_MAKE_NONCOPYABLE(SymbolsIterator);
21 public: 20 public:
22 SymbolsIterator(const UChar* buffer, unsigned bufferSize); 21 SymbolsIterator(const UChar* buffer, unsigned bufferSize);
23 22
24 bool consume(unsigned* symbolsLimit, FontFallbackPriority*); 23 bool consume(unsigned* symbolsLimit, FontFallbackPriority*);
25 24
26 private: 25 private:
27 FontFallbackPriority fontFallbackPriorityForCharacter(UChar32); 26 FontFallbackPriority fontFallbackPriorityForCharacter(UChar32);
28 27
29 std::unique_ptr<UTF16TextIterator> m_utf16Iterator; 28 OwnPtr<UTF16TextIterator> m_utf16Iterator;
30 unsigned m_bufferSize; 29 unsigned m_bufferSize;
31 UChar32 m_nextChar; 30 UChar32 m_nextChar;
32 bool m_atEnd; 31 bool m_atEnd;
33 32
34 FontFallbackPriority m_currentFontFallbackPriority; 33 FontFallbackPriority m_currentFontFallbackPriority;
35 FontFallbackPriority m_previousFontFallbackPriority; 34 FontFallbackPriority m_previousFontFallbackPriority;
36 }; 35 };
37 36
38 } // namespace blink 37 } // namespace blink
39 38
40 #endif 39 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698