OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_COMMON_DWRITE_TEXT_ANALYSIS_SOURCE_WIN_H_ | 5 #ifndef UI_GFX_WIN_TEXT_ANALYSIS_SOURCE_H_ |
6 #define CONTENT_COMMON_DWRITE_TEXT_ANALYSIS_SOURCE_WIN_H_ | 6 #define UI_GFX_WIN_TEXT_ANALYSIS_SOURCE_H_ |
7 | 7 |
8 #include <dwrite.h> | 8 #include <dwrite.h> |
9 #include <wrl.h> | 9 #include <wrl.h> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "content/common/content_export.h" | 13 #include "ui/gfx/gfx_export.h" |
14 | 14 |
15 namespace content { | 15 namespace gfx { |
| 16 namespace win { |
16 | 17 |
17 // Implements an IDWriteTextAnalysisSource, describing a single pre-defined | 18 // Implements an IDWriteTextAnalysisSource, describing a single pre-defined |
18 // chunk of text with a uniform locale, reading direction, and number | 19 // chunk of text with a uniform locale, reading direction, and number |
19 // substitution. | 20 // substitution. |
20 class CONTENT_EXPORT TextAnalysisSource | 21 class GFX_EXPORT TextAnalysisSource |
21 : public Microsoft::WRL::RuntimeClass< | 22 : public Microsoft::WRL::RuntimeClass< |
22 Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, | 23 Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, |
23 IDWriteTextAnalysisSource> { | 24 IDWriteTextAnalysisSource> { |
24 public: | 25 public: |
25 TextAnalysisSource(); | 26 TextAnalysisSource(); |
26 | 27 |
27 // IDWriteTextAnalysisSource: | 28 // IDWriteTextAnalysisSource: |
28 HRESULT STDMETHODCALLTYPE GetLocaleName(UINT32 text_position, | 29 HRESULT STDMETHODCALLTYPE GetLocaleName(UINT32 text_position, |
29 UINT32* text_length, | 30 UINT32* text_length, |
30 const WCHAR** locale_name) override; | 31 const WCHAR** locale_name) override; |
(...skipping 21 matching lines...) Expand all Loading... |
52 | 53 |
53 private: | 54 private: |
54 base::string16 text_; | 55 base::string16 text_; |
55 base::string16 locale_name_; | 56 base::string16 locale_name_; |
56 Microsoft::WRL::ComPtr<IDWriteNumberSubstitution> number_substitution_; | 57 Microsoft::WRL::ComPtr<IDWriteNumberSubstitution> number_substitution_; |
57 DWRITE_READING_DIRECTION reading_direction_; | 58 DWRITE_READING_DIRECTION reading_direction_; |
58 | 59 |
59 DISALLOW_ASSIGN(TextAnalysisSource); | 60 DISALLOW_ASSIGN(TextAnalysisSource); |
60 }; | 61 }; |
61 | 62 |
62 } // namespace content | 63 } // namespace win |
| 64 } // namespace gfx |
63 | 65 |
64 #endif // CONTENT_COMMON_DWRITE_TEXT_ANALYSIS_SOURCE_WIN_H_ | 66 #endif // UI_GFX_WIN_TEXT_ANALYSIS_SOURCE_H_ |
OLD | NEW |