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

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/CompositionMarker.h

Issue 2908643002: [DMC #23] Add CompositionMarker (subclass of DocumentMarker) (Closed)
Patch Set: Attempt to fix Android build by using EXPECT_FALSE() Created 3 years, 6 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 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 CompositionMarker_h
6 #define CompositionMarker_h
7
8 #include "core/editing/markers/DocumentMarker.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 CompositionMarker final : public DocumentMarker {
18 public:
19 CompositionMarker(unsigned start_offset,
20 unsigned end_offset,
21 Color underline_color,
22 bool thick,
23 Color background_color);
24
25 Color UnderlineColor() const;
26 bool Thick() const;
27 Color BackgroundColor() const;
28
29 private:
30 const Color underline_color_;
31 const Color background_color_;
32 const bool thick_;
33
34 DISALLOW_COPY_AND_ASSIGN(CompositionMarker);
35 };
36
37 DEFINE_TYPE_CASTS(CompositionMarker,
38 DocumentMarker,
39 marker,
40 marker->GetType() == DocumentMarker::kComposition,
41 marker.GetType() == DocumentMarker::kComposition);
42
43 } // namespace blink
44
45 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/BUILD.gn ('k') | third_party/WebKit/Source/core/editing/markers/CompositionMarker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698