Index: ui/metro_viewer/ime_types.h |
diff --git a/ui/metro_viewer/ime_types.h b/ui/metro_viewer/ime_types.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c314ac395cbdcfca9a42d8e25e11cbbb2a5eef73 |
--- /dev/null |
+++ b/ui/metro_viewer/ime_types.h |
@@ -0,0 +1,50 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_METRO_VIEWER_IME_TYPES_H_ |
+#define UI_METRO_VIEWER_IME_TYPES_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/strings/string16.h" |
+ |
+namespace metro_viewer { |
+ |
+// An equivalent to ui::CompositionUnderline defined in |
+// "ui/base/ime/composition_underline.h". Redefined here to avoid dependency |
+// on ui.gyp from metro_driver.gyp. |
+struct UnderlineInfo { |
+ UnderlineInfo() |
+ : start_offset(0), end_offset(0), thick(false) {} |
sky
2013/11/22 18:31:34
nit: when you wrap, one param per line (like 29-30
yukawa
2013/11/23 03:44:05
Done.
|
+ int32 start_offset; |
+ int32 end_offset; |
+ bool thick; |
+}; |
+ |
+// An equivalent to ui::CompositionText defined in |
+// "ui/base/ime/composition_text.h". Redefined here to avoid dependency |
+// on ui.gyp from metro_driver.gyp. |
+struct Composition { |
+ Composition() |
+ : selection_start(0), |
+ selection_end(0) {} |
+ string16 text; |
+ int32 selection_start; |
+ int32 selection_end; |
+ std::vector<UnderlineInfo> underlines; |
sky
2013/11/22 18:31:34
Don't you want to more destructor definition to .c
yukawa
2013/11/23 03:44:05
Yes, totally agreed.
I also put the other constru
|
+}; |
+ |
+// An equivalent to Win32 RECT structure. This can be gfx::Rect but redefined |
+// here to avoid dependency on gfx.gyp from metro_driver.gyp. |
+struct CharacterBounds { |
+ CharacterBounds() |
+ : left(0), top(0), right(0), bottom(0) {} |
sky
2013/11/22 18:31:34
same comment here about one per line.
yukawa
2013/11/23 03:44:05
Done.
|
+ int32 left; |
+ int32 top; |
+ int32 right; |
+ int32 bottom; |
+}; |
+ |
+} // namespace metro_viewer |
+ |
+#endif // UI_METRO_VIEWER_IME_TYPES_H_ |