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 #include "content/common/dwrite_text_analysis_source_win.h" | 5 #include "ui/gfx/win/text_analysis_source.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace content { | 9 namespace gfx { |
| 10 namespace win { |
10 | 11 |
11 TextAnalysisSource::TextAnalysisSource() = default; | 12 TextAnalysisSource::TextAnalysisSource() = default; |
12 TextAnalysisSource::~TextAnalysisSource() = default; | 13 TextAnalysisSource::~TextAnalysisSource() = default; |
13 | 14 |
14 HRESULT TextAnalysisSource::GetLocaleName(UINT32 text_position, | 15 HRESULT TextAnalysisSource::GetLocaleName(UINT32 text_position, |
15 UINT32* text_length, | 16 UINT32* text_length, |
16 const WCHAR** locale_name) { | 17 const WCHAR** locale_name) { |
17 if (text_position >= text_.length() || !text_length || !locale_name) | 18 if (text_position >= text_.length() || !text_length || !locale_name) |
18 return E_INVALIDARG; | 19 return E_INVALIDARG; |
19 *text_length = text_.length() - text_position; | 20 *text_length = text_.length() - text_position; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 IDWriteNumberSubstitution* number_substitution, | 73 IDWriteNumberSubstitution* number_substitution, |
73 DWRITE_READING_DIRECTION reading_direction) { | 74 DWRITE_READING_DIRECTION reading_direction) { |
74 DCHECK(number_substitution); | 75 DCHECK(number_substitution); |
75 text_ = text; | 76 text_ = text; |
76 locale_name_ = locale_name; | 77 locale_name_ = locale_name; |
77 number_substitution_ = number_substitution; | 78 number_substitution_ = number_substitution; |
78 reading_direction_ = reading_direction; | 79 reading_direction_ = reading_direction; |
79 return S_OK; | 80 return S_OK; |
80 } | 81 } |
81 | 82 |
82 } // namespace content | 83 } // namespace win |
| 84 } // namespace gfx |
OLD | NEW |