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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/OrientationIterator.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 OrientationIterator_h 5 #ifndef OrientationIterator_h
6 #define OrientationIterator_h 6 #define OrientationIterator_h
7 7
8 #include "platform/fonts/FontOrientation.h" 8 #include "platform/fonts/FontOrientation.h"
9 #include "platform/fonts/ScriptRunIterator.h" 9 #include "platform/fonts/ScriptRunIterator.h"
10 #include "platform/fonts/UTF16TextIterator.h" 10 #include "platform/fonts/UTF16TextIterator.h"
11 #include "wtf/Allocator.h" 11 #include "wtf/Allocator.h"
12 #include "wtf/Noncopyable.h" 12 #include "wtf/Noncopyable.h"
13 #include <memory>
14 13
15 namespace blink { 14 namespace blink {
16 15
17 class PLATFORM_EXPORT OrientationIterator { 16 class PLATFORM_EXPORT OrientationIterator {
18 USING_FAST_MALLOC(OrientationIterator); 17 USING_FAST_MALLOC(OrientationIterator);
19 WTF_MAKE_NONCOPYABLE(OrientationIterator); 18 WTF_MAKE_NONCOPYABLE(OrientationIterator);
20 public: 19 public:
21 enum RenderOrientation { 20 enum RenderOrientation {
22 OrientationKeep, 21 OrientationKeep,
23 OrientationRotateSideways, 22 OrientationRotateSideways,
24 OrientationInvalid 23 OrientationInvalid
25 }; 24 };
26 25
27 OrientationIterator(const UChar* buffer, unsigned bufferSize, FontOrientatio n runOrientation); 26 OrientationIterator(const UChar* buffer, unsigned bufferSize, FontOrientatio n runOrientation);
28 27
29 bool consume(unsigned* orientationLimit, RenderOrientation*); 28 bool consume(unsigned* orientationLimit, RenderOrientation*);
30 private: 29 private:
31 std::unique_ptr<UTF16TextIterator> m_utf16Iterator; 30 OwnPtr<UTF16TextIterator> m_utf16Iterator;
32 unsigned m_bufferSize; 31 unsigned m_bufferSize;
33 bool m_atEnd; 32 bool m_atEnd;
34 }; 33 };
35 34
36 } // namespace blink 35 } // namespace blink
37 36
38 #endif 37 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698