OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 #pragma once |
| 8 |
| 9 #include <vector> |
| 10 |
| 11 #include "third_party/skia/include/core/SkColor.h" |
| 12 |
| 13 namespace ui { |
| 14 |
| 15 // Intentionally keep sync with WebKit::WebCompositionUnderline defined in: |
| 16 // third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h |
| 17 struct CompositionUnderline { |
| 18 CompositionUnderline() |
| 19 : start_offset(0), |
| 20 end_offset(0), |
| 21 color(0), |
| 22 thick(false) {} |
| 23 |
| 24 CompositionUnderline(unsigned s, unsigned e, SkColor c, bool t) |
| 25 : start_offset(s), |
| 26 end_offset(e), |
| 27 color(c), |
| 28 thick(t) {} |
| 29 |
| 30 // Though use of unsigned is discouraged, we use it here to make sure it's |
| 31 // identical to WebKit::WebCompositionUnderline. |
| 32 unsigned start_offset; |
| 33 unsigned end_offset; |
| 34 SkColor color; |
| 35 bool thick; |
| 36 }; |
| 37 |
| 38 typedef std::vector<CompositionUnderline> CompositionUnderlines; |
| 39 |
| 40 } // namespace ui |
| 41 |
| 42 #endif // UI_BASE_IME_COMPOSITION_UNDERLINE_H_ |
OLD | NEW |