| Index: ppapi/examples/ime/ime.cc
|
| diff --git a/ppapi/examples/ime/ime.cc b/ppapi/examples/ime/ime.cc
|
| index 6f3e65569aaba38f60f6a8fa4ba4a6e5bd3f7d0e..5610cd4ea058a3045c1ca66dd9036ad0c21b7e15 100644
|
| --- a/ppapi/examples/ime/ime.cc
|
| +++ b/ppapi/examples/ime/ime.cc
|
| @@ -10,15 +10,15 @@
|
| #include "ppapi/c/ppb_console.h"
|
| #include "ppapi/cpp/completion_callback.h"
|
| #include "ppapi/cpp/dev/font_dev.h"
|
| -#include "ppapi/cpp/dev/ime_input_event_dev.h"
|
| -#include "ppapi/cpp/dev/text_input_dev.h"
|
| #include "ppapi/cpp/graphics_2d.h"
|
| #include "ppapi/cpp/image_data.h"
|
| +#include "ppapi/cpp/ime_input_event.h"
|
| #include "ppapi/cpp/input_event.h"
|
| #include "ppapi/cpp/instance.h"
|
| #include "ppapi/cpp/module.h"
|
| #include "ppapi/cpp/rect.h"
|
| #include "ppapi/cpp/size.h"
|
| +#include "ppapi/cpp/text_input.h"
|
|
|
| namespace {
|
|
|
| @@ -117,9 +117,9 @@ class TextFieldStatusNotifyingHandler : public TextFieldStatusHandler {
|
| }
|
|
|
| private:
|
| - class MyTextInput : public pp::TextInput_Dev {
|
| + class MyTextInput : public pp::TextInput {
|
| public:
|
| - MyTextInput(pp::Instance* instance) : pp::TextInput_Dev(instance) {}
|
| + MyTextInput(pp::Instance* instance) : pp::TextInput(instance) {}
|
| virtual void RequestSurroundingText(uint32_t characters) {
|
| UpdateSurroundingText(selection_text_, 0, selection_text_.size());
|
| }
|
| @@ -428,7 +428,7 @@ class MyInstance : public pp::Instance {
|
| //
|
| // When a plugin never wants to accept text input, at initialization
|
| // explicitly turn off the text input feature by calling:
|
| - pp::TextInput_Dev(this).SetTextInputType(PP_TEXTINPUT_TYPE_NONE);
|
| + pp::TextInput(this).SetTextInputType(PP_TEXTINPUT_TYPE_NONE);
|
| } else if (argv[i] == std::string("unaware")) {
|
| // Demonstrating the behavior of IME-unaware plugins.
|
| // Never call any text input related APIs.
|
| @@ -502,25 +502,25 @@ class MyInstance : public pp::Instance {
|
| break;
|
| }
|
| case PP_INPUTEVENT_TYPE_IME_COMPOSITION_START: {
|
| - const pp::IMEInputEvent_Dev imeEvent(event);
|
| + const pp::IMEInputEvent imeEvent(event);
|
| Log("CompositionStart [" + imeEvent.GetText().AsString() + "]");
|
| ret = true;
|
| break;
|
| }
|
| case PP_INPUTEVENT_TYPE_IME_COMPOSITION_UPDATE: {
|
| - const pp::IMEInputEvent_Dev imeEvent(event);
|
| + const pp::IMEInputEvent imeEvent(event);
|
| Log("CompositionUpdate [" + imeEvent.GetText().AsString() + "]");
|
| ret = OnCompositionUpdate(imeEvent);
|
| break;
|
| }
|
| case PP_INPUTEVENT_TYPE_IME_COMPOSITION_END: {
|
| - const pp::IMEInputEvent_Dev imeEvent(event);
|
| + const pp::IMEInputEvent imeEvent(event);
|
| Log("CompositionEnd [" + imeEvent.GetText().AsString() + "]");
|
| ret = OnCompositionEnd(imeEvent);
|
| break;
|
| }
|
| case PP_INPUTEVENT_TYPE_IME_TEXT: {
|
| - const pp::IMEInputEvent_Dev imeEvent(event);
|
| + const pp::IMEInputEvent imeEvent(event);
|
| Log("ImeText [" + imeEvent.GetText().AsString() + "]");
|
| ret = OnImeText(imeEvent);
|
| break;
|
| @@ -541,13 +541,13 @@ class MyInstance : public pp::Instance {
|
| }
|
|
|
| private:
|
| - bool OnCompositionUpdate(const pp::IMEInputEvent_Dev& ev) {
|
| + bool OnCompositionUpdate(const pp::IMEInputEvent& ev) {
|
| for (std::vector<MyTextField>::iterator it = textfield_.begin();
|
| it != textfield_.end();
|
| ++it) {
|
| if (it->Focused()) {
|
| std::vector< std::pair<uint32_t, uint32_t> > segs;
|
| - for (uint32_t i = 0; i < ev.GetSegmentNumber(); ++i)
|
| + for (uint32_t i = 0; i < ev.GetSegmentCount(); ++i)
|
| segs.push_back(std::make_pair(ev.GetSegmentOffset(i),
|
| ev.GetSegmentOffset(i + 1)));
|
| it->SetComposition(ev.GetText().AsString(),
|
| @@ -560,7 +560,7 @@ class MyInstance : public pp::Instance {
|
| return false;
|
| }
|
|
|
| - bool OnCompositionEnd(const pp::IMEInputEvent_Dev& ev) {
|
| + bool OnCompositionEnd(const pp::IMEInputEvent& ev) {
|
| for (std::vector<MyTextField>::iterator it = textfield_.begin();
|
| it != textfield_.end();
|
| ++it) {
|
| @@ -667,7 +667,7 @@ class MyInstance : public pp::Instance {
|
| return false;
|
| }
|
|
|
| - bool OnImeText(const pp::IMEInputEvent_Dev ev) {
|
| + bool OnImeText(const pp::IMEInputEvent ev) {
|
| for (std::vector<MyTextField>::iterator it = textfield_.begin();
|
| it != textfield_.end();
|
| ++it) {
|
|
|