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

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: 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 (c) 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 block of text.
18 class CONTENT_EXPORT TextAnalysisSource
ananta 2016/04/12 23:44:39 Please add some comments about when this class is
Ilya Kulshin 2016/04/13 01:33:29 This class doesn't really have any special use asi
ananta 2016/04/13 23:31:09 If we have a use case in the current patch, pointi
Ilya Kulshin 2016/04/13 23:59:40 Such a comment would certainly become outdated, an
19 : public Microsoft::WRL::RuntimeClass<
20 Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
21 IDWriteTextAnalysisSource> {
22 public:
23 HRESULT STDMETHODCALLTYPE GetLocaleName(UINT32 text_position,
24 UINT32* text_length,
25 const WCHAR** locale_name) override;
26 HRESULT STDMETHODCALLTYPE GetNumberSubstitution(
ananta 2016/04/12 23:44:39 newline between methods.
Ilya Kulshin 2016/04/13 01:33:29 Added a comment to make it clear that these are ov
27 UINT32 text_position,
28 UINT32* text_length,
29 IDWriteNumberSubstitution** number_substitution) override;
30 DWRITE_READING_DIRECTION STDMETHODCALLTYPE
31 GetParagraphReadingDirection() override;
32 HRESULT STDMETHODCALLTYPE GetTextAtPosition(UINT32 text_position,
33 const WCHAR** text_string,
34 UINT32* text_length) override;
35 HRESULT STDMETHODCALLTYPE GetTextBeforePosition(UINT32 text_position,
36 const WCHAR** text_string,
37 UINT32* text_length) override;
38
39 HRESULT STDMETHODCALLTYPE
40 RuntimeClassInitialize(const base::string16& text,
41 const base::string16& locale_name,
42 IDWriteNumberSubstitution* number_substitution,
43 DWRITE_READING_DIRECTION reading_direction);
44
45 protected:
46 ~TextAnalysisSource();
47
48 private:
49 base::string16 text_;
50 base::string16 locale_name_;
51 Microsoft::WRL::ComPtr<IDWriteNumberSubstitution> number_substitution_;
ananta 2016/04/12 23:44:39 Some comments about the non obvious members would
Ilya Kulshin 2016/04/13 01:33:29 Added some explanatory comments in the header. The
52 DWRITE_READING_DIRECTION reading_direction_;
53
54 DISALLOW_ASSIGN(TextAnalysisSource);
55 };
56
57 } // namespace content
58
59 #endif // CONTENT_COMMON_DWRITE_TEXT_ANALYSIS_SOURCE_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698