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

Side by Side Diff: content/common/dwrite_text_analysis_source_win.h

Issue 1846433005: Implement direct write fallback proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a missing SUCCEEDED call Created 4 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_DWRITE_TEXT_ANALYSIS_SOURCE_WIN_H_
6 #define CONTENT_COMMON_DWRITE_TEXT_ANALYSIS_SOURCE_WIN_H_
7
8 #include <dwrite.h>
9 #include <wrl.h>
10
11 #include "base/macros.h"
12 #include "base/strings/string16.h"
13 #include "content/common/content_export.h"
14
15 namespace content {
16
17 // Implements an IDWriteTextAnalysisSource, describing a single pre-defined
18 // chunk of text with a uniform locale, reading direction, and number
19 // substitution.
20 class CONTENT_EXPORT TextAnalysisSource
21 : public Microsoft::WRL::RuntimeClass<
22 Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
23 IDWriteTextAnalysisSource> {
24 public:
25 TextAnalysisSource();
26
27 // IDWriteTextAnalysisSource:
28 HRESULT STDMETHODCALLTYPE GetLocaleName(UINT32 text_position,
29 UINT32* text_length,
30 const WCHAR** locale_name) override;
31 HRESULT STDMETHODCALLTYPE GetNumberSubstitution(
32 UINT32 text_position,
33 UINT32* text_length,
34 IDWriteNumberSubstitution** number_substitution) override;
35 DWRITE_READING_DIRECTION STDMETHODCALLTYPE
36 GetParagraphReadingDirection() override;
37 HRESULT STDMETHODCALLTYPE GetTextAtPosition(UINT32 text_position,
38 const WCHAR** text_string,
39 UINT32* text_length) override;
40 HRESULT STDMETHODCALLTYPE GetTextBeforePosition(UINT32 text_position,
41 const WCHAR** text_string,
42 UINT32* text_length) override;
43
44 HRESULT STDMETHODCALLTYPE
45 RuntimeClassInitialize(const base::string16& text,
46 const base::string16& locale_name,
47 IDWriteNumberSubstitution* number_substitution,
48 DWRITE_READING_DIRECTION reading_direction);
49
50 protected:
51 ~TextAnalysisSource() override;
52
53 private:
54 base::string16 text_;
55 base::string16 locale_name_;
56 Microsoft::WRL::ComPtr<IDWriteNumberSubstitution> number_substitution_;
57 DWRITE_READING_DIRECTION reading_direction_;
58
59 DISALLOW_ASSIGN(TextAnalysisSource);
60 };
61
62 } // namespace content
63
64 #endif // CONTENT_COMMON_DWRITE_TEXT_ANALYSIS_SOURCE_WIN_H_
OLDNEW
« no previous file with comments | « content/common/dwrite_font_proxy_messages.h ('k') | content/common/dwrite_text_analysis_source_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698