1 // Copyright (c) 2012 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.
5 #ifndef UI_BASE_IME_COMPOSITION_UNDERLINE_H_
6 #define UI_BASE_IME_COMPOSITION_UNDERLINE_H_
10 #include "third_party/skia/include/core/SkColor.h"
14 // Intentionally keep sync with blink::WebCompositionUnderline defined in:
15 // third_party/WebKit/public/web/WebCompositionUnderline.h
16 struct CompositionUnderline
{
17 CompositionUnderline()
23 CompositionUnderline(unsigned s
, unsigned e
, SkColor c
, bool t
)
29 bool operator==(const CompositionUnderline
& rhs
) const {
30 return (this->start_offset
== rhs
.start_offset
) &&
31 (this->end_offset
== rhs
.end_offset
) &&
32 (this->color
== rhs
.color
) &&
33 (this->thick
== rhs
.thick
);
36 bool operator!=(const CompositionUnderline
& rhs
) const {
37 return !(*this == rhs
);
40 // Though use of unsigned is discouraged, we use it here to make sure it's
41 // identical to blink::WebCompositionUnderline.
42 unsigned start_offset
;
48 typedef std::vector
<CompositionUnderline
> CompositionUnderlines
;
52 #endif // UI_BASE_IME_COMPOSITION_UNDERLINE_H_