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

Unified Diff: ppapi/shared_impl/input_event_impl.cc

Issue 8059006: Additional update on Pepper IME API and boilerplate thunk/proxy implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make win_shared happy. Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/shared_impl/input_event_impl.h ('k') | ppapi/thunk/interfaces_ppb_public_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/input_event_impl.cc
diff --git a/ppapi/shared_impl/input_event_impl.cc b/ppapi/shared_impl/input_event_impl.cc
index 8dc653a8d3fbc581cbd292f6cc3cac0ff304a60d..d0ca57c0b19345e28d426462219497f582013ead 100644
--- a/ppapi/shared_impl/input_event_impl.cc
+++ b/ppapi/shared_impl/input_event_impl.cc
@@ -24,7 +24,10 @@ InputEventData::InputEventData()
wheel_ticks(PP_MakeFloatPoint(0.0f, 0.0f)),
wheel_scroll_by_page(false),
key_code(0),
- character_text() {
+ character_text(),
+ composition_target_segment(-1),
+ composition_selection_start(0),
+ composition_selection_end(0) {
}
InputEventData::~InputEventData() {
@@ -102,5 +105,27 @@ PP_Var InputEventImpl::GetCharacterText() {
data_.character_text);
}
-} // namespace ppapi
+uint32_t InputEventImpl::GetIMESegmentNumber() {
+ if (data_.composition_segment_offsets.empty())
+ return 0;
+ return data_.composition_segment_offsets.size() - 1;
+}
+uint32_t InputEventImpl::GetIMESegmentOffset(uint32_t index) {
+ if (index >= data_.composition_segment_offsets.size())
+ return 0;
+ return data_.composition_segment_offsets[index];
+}
+
+int32_t InputEventImpl::GetIMETargetSegment() {
+ return data_.composition_target_segment;
+}
+
+void InputEventImpl::GetIMESelection(uint32_t* start, uint32_t* end) {
+ if (start)
+ *start = data_.composition_selection_start;
+ if (end)
+ *end = data_.composition_selection_end;
+}
+
+} // namespace ppapi
« no previous file with comments | « ppapi/shared_impl/input_event_impl.h ('k') | ppapi/thunk/interfaces_ppb_public_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698