Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / ui / base / ime / composition_underline.h
blobc8d09d8416336eb0b86ece88b53af062a80efb04
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 "third_party/skia/include/core/SkColor.h"
12 namespace ui {
14 // Intentionally keep sync with blink::WebCompositionUnderline defined in:
15 // third_party/WebKit/public/web/WebCompositionUnderline.h
16 struct CompositionUnderline {
17 CompositionUnderline()
18 : start_offset(0),
19 end_offset(0),
20 color(0),
21 thick(false) {}
23 CompositionUnderline(unsigned s, unsigned e, SkColor c, bool t)
24 : start_offset(s),
25 end_offset(e),
26 color(c),
27 thick(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;
43 unsigned end_offset;
44 SkColor color;
45 bool thick;
48 typedef std::vector<CompositionUnderline> CompositionUnderlines;
50 } // namespace ui
52 #endif // UI_BASE_IME_COMPOSITION_UNDERLINE_H_