Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / ui / base / ime / composition_underline.h
bloba8c44b66854d534ef673c14fc073f4d8e9c41022
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_
8 #include <vector>
10 #include "base/basictypes.h"
11 #include "third_party/skia/include/core/SkColor.h"
13 namespace ui {
15 // Intentionally keep sync with blink::WebCompositionUnderline defined in:
16 // third_party/WebKit/public/web/WebCompositionUnderline.h
17 struct CompositionUnderline {
18 CompositionUnderline()
19 : start_offset(0),
20 end_offset(0),
21 color(SK_ColorTRANSPARENT),
22 thick(false),
23 background_color(SK_ColorTRANSPARENT) {}
25 // TODO(huangs): remove this constructor.
26 CompositionUnderline(uint32 s, uint32 e, SkColor c, bool t)
27 : start_offset(s),
28 end_offset(e),
29 color(c),
30 thick(t),
31 background_color(SK_ColorTRANSPARENT) {}
33 CompositionUnderline(uint32 s, uint32 e, SkColor c, bool t, SkColor bc)
34 : start_offset(s),
35 end_offset(e),
36 color(c),
37 thick(t),
38 background_color(bc) {}
40 bool operator==(const CompositionUnderline& rhs) const {
41 return (this->start_offset == rhs.start_offset) &&
42 (this->end_offset == rhs.end_offset) && (this->color == rhs.color) &&
43 (this->thick == rhs.thick) &&
44 (this->background_color == rhs.background_color);
47 bool operator!=(const CompositionUnderline& rhs) const {
48 return !(*this == rhs);
51 uint32 start_offset;
52 uint32 end_offset;
53 SkColor color;
54 bool thick;
55 SkColor background_color;
58 typedef std::vector<CompositionUnderline> CompositionUnderlines;
60 } // namespace ui
62 #endif // UI_BASE_IME_COMPOSITION_UNDERLINE_H_