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

Side by Side Diff: ui/base/ime/composition_underline.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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
« no previous file with comments | « ui/base/ime/composition_text_util_pango_unittest.cc ('k') | ui/base/ime/dummy_input_method.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef UI_BASE_IME_COMPOSITION_UNDERLINE_H_
6 #define UI_BASE_IME_COMPOSITION_UNDERLINE_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "third_party/skia/include/core/SkColor.h"
12
13 namespace ui {
14
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) {}
24
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) {}
32
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) {}
39
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);
45 }
46
47 bool operator!=(const CompositionUnderline& rhs) const {
48 return !(*this == rhs);
49 }
50
51 uint32 start_offset;
52 uint32 end_offset;
53 SkColor color;
54 bool thick;
55 SkColor background_color;
56 };
57
58 typedef std::vector<CompositionUnderline> CompositionUnderlines;
59
60 } // namespace ui
61
62 #endif // UI_BASE_IME_COMPOSITION_UNDERLINE_H_
OLDNEW
« no previous file with comments | « ui/base/ime/composition_text_util_pango_unittest.cc ('k') | ui/base/ime/dummy_input_method.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698