OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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 ActiveSuggestionMarker_h | |
6 #define ActiveSuggestionMarker_h | |
7 | |
8 #include "core/editing/markers/StyleableMarker.h" | |
9 | |
10 namespace blink { | |
11 | |
12 // A subclass of DocumentMarker used to store information specific to | |
13 // composition markers. We store what color to display the underline (possibly | |
14 // transparent), whether the underline should be thick or not, and what | |
15 // background color should be used under the marked text (also possibly | |
16 // transparent). | |
17 class CORE_EXPORT ActiveSuggestionMarker final : public StyleableMarker { | |
18 public: | |
19 ActiveSuggestionMarker(unsigned start_offset, | |
20 unsigned end_offset, | |
21 Color underline_color, | |
22 Thickness, | |
23 Color background_color); | |
24 | |
25 // DocumentMarker implementations | |
26 MarkerType GetType() const; | |
yosin_UTC9
2017/06/06 01:27:47
nit: s/;/const final;/
| |
27 | |
28 private: | |
29 DISALLOW_COPY_AND_ASSIGN(ActiveSuggestionMarker); | |
30 }; | |
31 | |
32 DEFINE_TYPE_CASTS(ActiveSuggestionMarker, | |
33 DocumentMarker, | |
34 marker, | |
35 marker->GetType() == DocumentMarker::kActiveSuggestion, | |
36 marker.GetType() == DocumentMarker::kActiveSuggestion); | |
37 | |
38 } // namespace blink | |
39 | |
40 #endif | |
OLD | NEW |