OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "wtf/RefPtr.h" | 33 #include "wtf/RefPtr.h" |
34 #include "wtf/Vector.h" | 34 #include "wtf/Vector.h" |
35 #include "wtf/text/AtomicString.h" | 35 #include "wtf/text/AtomicString.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class PLATFORM_EXPORT FontFeature { | 39 class PLATFORM_EXPORT FontFeature { |
40 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 40 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
41 public: | 41 public: |
42 FontFeature(const AtomicString& tag, int value); | 42 FontFeature(const AtomicString& tag, int value); |
43 bool operator==(const FontFeature&); | 43 bool operator==(const FontFeature&) const; |
44 | 44 |
45 const AtomicString& tag() const { return m_tag; } | 45 const AtomicString& tag() const { return m_tag; } |
46 int value() const { return m_value; } | 46 int value() const { return m_value; } |
47 | 47 |
48 private: | 48 private: |
49 AtomicString m_tag; | 49 AtomicString m_tag; |
50 const int m_value; | 50 const int m_value; |
51 }; | 51 }; |
52 | 52 |
53 class PLATFORM_EXPORT FontFeatureSettings : public RefCounted<FontFeatureSetting
s> { | 53 class PLATFORM_EXPORT FontFeatureSettings : public RefCounted<FontFeatureSetting
s> { |
54 WTF_MAKE_NONCOPYABLE(FontFeatureSettings); | 54 WTF_MAKE_NONCOPYABLE(FontFeatureSettings); |
55 public: | 55 public: |
56 static PassRefPtr<FontFeatureSettings> create() | 56 static PassRefPtr<FontFeatureSettings> create() |
57 { | 57 { |
58 return adoptRef(new FontFeatureSettings()); | 58 return adoptRef(new FontFeatureSettings()); |
59 } | 59 } |
60 void append(const FontFeature& feature) { m_list.append(feature); } | 60 void append(const FontFeature& feature) { m_list.append(feature); } |
61 size_t size() const { return m_list.size(); } | 61 size_t size() const { return m_list.size(); } |
62 const FontFeature& operator[](int index) const { return m_list[index]; } | 62 const FontFeature& operator[](int index) const { return m_list[index]; } |
63 const FontFeature& at(size_t index) const { return m_list.at(index); } | 63 const FontFeature& at(size_t index) const { return m_list.at(index); } |
| 64 bool operator==(const FontFeatureSettings&) const; |
64 | 65 |
65 private: | 66 private: |
66 FontFeatureSettings(); | 67 FontFeatureSettings(); |
67 Vector<FontFeature> m_list; | 68 Vector<FontFeature> m_list; |
68 }; | 69 }; |
69 | 70 |
70 } // namespace blink | 71 } // namespace blink |
71 | 72 |
72 #endif // FontFeatureSettings_h | 73 #endif // FontFeatureSettings_h |
OLD | NEW |