Chromium Code Reviews| Index: ppapi/thunk/ppb_input_event_thunk.cc |
| diff --git a/ppapi/thunk/ppb_input_event_thunk.cc b/ppapi/thunk/ppb_input_event_thunk.cc |
| index ef495d111f1798f9a327044dd2bdb5e1eccdfd5f..3981b747fac136c5e3cf689135602b60dd7b371d 100644 |
| --- a/ppapi/thunk/ppb_input_event_thunk.cc |
| +++ b/ppapi/thunk/ppb_input_event_thunk.cc |
| @@ -9,6 +9,26 @@ |
| #include "ppapi/thunk/resource_creation_api.h" |
| #include "ppapi/thunk/thunk.h" |
| +// This struct is for ABI compatibility for PPAPI Flash and PDF plugin. |
| +// TODO(nona): Remove once Flash and PDF support IMEInputEvent1.0. |
| +struct PPB_IMEInputEvent_Dev_0_2 { |
|
dmichael (off chromium)
2013/07/18 03:50:20
I'd really prefer if we just kept the old IDL arou
Seigo Nonaka
2013/07/23 11:49:54
Sure, I revert dev IDLs.
On 2013/07/18 03:50:20,
|
| + PP_Resource (*Create)(PP_Instance instance, |
| + PP_InputEvent_Type type, |
| + PP_TimeTicks time_stamp, |
| + struct PP_Var text, |
| + uint32_t segment_number, |
| + const uint32_t segment_offsets[], |
| + int32_t target_segment, |
| + uint32_t selection_start, |
| + uint32_t selection_end); |
| + PP_Bool (*IsIMEInputEvent)(PP_Resource resource); |
| + struct PP_Var (*GetText)(PP_Resource ime_event); |
| + uint32_t (*GetSegmentCount)(PP_Resource ime_event); |
| + uint32_t (*GetSegmentOffset)(PP_Resource ime_event, uint32_t index); |
| + int32_t (*GetTargetSegment)(PP_Resource ime_event); |
| + void (*GetSelection)(PP_Resource ime_event, uint32_t* start, uint32_t* end); |
| +}; |
| + |
| namespace ppapi { |
| namespace thunk { |
| @@ -327,7 +347,7 @@ PP_Resource CreateIMEInputEvent(PP_Instance instance, |
| int32_t target_segment, |
| uint32_t selection_start, |
| uint32_t selection_end) { |
| - VLOG(4) << "PPB_IMEInputEvent_Dev::Create()"; |
| + VLOG(4) << "PPB_IMEInputEvent::Create()"; |
| EnterResourceCreation enter(instance); |
| if (enter.failed()) |
| return 0; |
| @@ -340,7 +360,7 @@ PP_Resource CreateIMEInputEvent(PP_Instance instance, |
| } |
| PP_Bool IsIMEInputEvent(PP_Resource resource) { |
| - VLOG(4) << "PPB_IMEInputEvent_Dev::IsIMEInputEvent()"; |
| + VLOG(4) << "PPB_IMEInputEvent::IsIMEInputEvent()"; |
| if (!IsInputEvent(resource)) |
| return PP_FALSE; // Prevent warning log in GetType. |
| PP_InputEvent_Type type = GetType(resource); |
| @@ -351,12 +371,12 @@ PP_Bool IsIMEInputEvent(PP_Resource resource) { |
| } |
| PP_Var GetIMEText(PP_Resource ime_event) { |
| - VLOG(4) << "PPB_IMEInputEvent_Dev::GetText()"; |
| + VLOG(4) << "PPB_IMEInputEvent::GetText()"; |
| return GetCharacterText(ime_event); |
| } |
| uint32_t GetIMESegmentNumber(PP_Resource ime_event) { |
| - VLOG(4) << "PPB_IMEInputEvent_Dev::GetSegmentNumber()"; |
| + VLOG(4) << "PPB_IMEInputEvent::GetSegmentCount()"; |
| EnterInputEvent enter(ime_event, true); |
| if (enter.failed()) |
| return 0; |
| @@ -364,7 +384,7 @@ uint32_t GetIMESegmentNumber(PP_Resource ime_event) { |
| } |
| uint32_t GetIMESegmentOffset(PP_Resource ime_event, uint32_t index) { |
| - VLOG(4) << "PPB_IMEInputEvent_Dev::GetSegmentOffset()"; |
| + VLOG(4) << "PPB_IMEInputEvent::GetSegmentOffset()"; |
| EnterInputEvent enter(ime_event, true); |
| if (enter.failed()) |
| return 0; |
| @@ -372,7 +392,7 @@ uint32_t GetIMESegmentOffset(PP_Resource ime_event, uint32_t index) { |
| } |
| int32_t GetIMETargetSegment(PP_Resource ime_event) { |
| - VLOG(4) << "PPB_IMEInputEvent_Dev::GetTargetSegment()"; |
| + VLOG(4) << "PPB_IMEInputEvent::GetTargetSegment()"; |
| EnterInputEvent enter(ime_event, true); |
| if (enter.failed()) |
| return -1; |
| @@ -380,7 +400,7 @@ int32_t GetIMETargetSegment(PP_Resource ime_event) { |
| } |
| void GetIMESelection(PP_Resource ime_event, uint32_t* start, uint32_t* end) { |
| - VLOG(4) << "PPB_IMEInputEvent_Dev::GetSelection()"; |
| + VLOG(4) << "PPB_IMEInputEvent::GetSelection()"; |
| EnterInputEvent enter(ime_event, true); |
| if (enter.failed()) { |
| if (start) |
| @@ -392,7 +412,8 @@ void GetIMESelection(PP_Resource ime_event, uint32_t* start, uint32_t* end) { |
| enter.object()->GetIMESelection(start, end); |
| } |
| -const PPB_IMEInputEvent_Dev_0_1 g_ppb_ime_input_event_0_1_thunk = { |
| +const PPB_IMEInputEvent_1_0 g_ppb_ime_input_event_1_0_thunk = { |
| + &CreateIMEInputEvent, |
| &IsIMEInputEvent, |
| &GetIMEText, |
| &GetIMESegmentNumber, |
| @@ -401,7 +422,8 @@ const PPB_IMEInputEvent_Dev_0_1 g_ppb_ime_input_event_0_1_thunk = { |
| &GetIMESelection |
| }; |
| -const PPB_IMEInputEvent_Dev_0_2 g_ppb_ime_input_event_0_2_thunk = { |
| +// TODO(nona): Remove once Flash and PDF plugin support IMEInputEvent1.0. |
| +const PPB_IMEInputEvent_Dev_0_2 g_ppb_ime_input_event_dev_0_2_thunk = { |
| &CreateIMEInputEvent, |
| &IsIMEInputEvent, |
| &GetIMEText, |
| @@ -510,12 +532,13 @@ const PPB_WheelInputEvent_1_0* GetPPB_WheelInputEvent_1_0_Thunk() { |
| return &g_ppb_wheel_input_event_thunk; |
| } |
| -const PPB_IMEInputEvent_Dev_0_1* GetPPB_IMEInputEvent_Dev_0_1_Thunk() { |
| - return &g_ppb_ime_input_event_0_1_thunk; |
| +const PPB_IMEInputEvent_1_0* GetPPB_IMEInputEvent_1_0_Thunk() { |
| + return &g_ppb_ime_input_event_1_0_thunk; |
| } |
| +// TODO(nona): Remove once Flash and PDF plugin support IMEInputEvent1.0. |
| const PPB_IMEInputEvent_Dev_0_2* GetPPB_IMEInputEvent_Dev_0_2_Thunk() { |
| - return &g_ppb_ime_input_event_0_2_thunk; |
| + return &g_ppb_ime_input_event_dev_0_2_thunk; |
| } |
| const PPB_TouchInputEvent_1_0* GetPPB_TouchInputEvent_1_0_Thunk() { |