Chromium Code Reviews| Index: ppapi/cpp/text_input_controller.h |
| diff --git a/ppapi/cpp/dev/text_input_dev.h b/ppapi/cpp/text_input_controller.h |
| similarity index 56% |
| copy from ppapi/cpp/dev/text_input_dev.h |
| copy to ppapi/cpp/text_input_controller.h |
| index ea755977d158dc1125bab80796d6caaa8ad5c692..b2ee00f657aabafe1f7b9b1adb3da0d4bae36ffd 100644 |
| --- a/ppapi/cpp/dev/text_input_dev.h |
| +++ b/ppapi/cpp/text_input_controller.h |
| @@ -2,12 +2,12 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef PPAPI_CPP_DEV_TEXT_INPUT_DEV_H_ |
| -#define PPAPI_CPP_DEV_TEXT_INPUT_DEV_H_ |
| +#ifndef PPAPI_CPP_TEXT_INPUT_CONTROLLER_H_ |
| +#define PPAPI_CPP_TEXT_INPUT_CONTROLLER_H_ |
| #include <string> |
| -#include "ppapi/c/dev/ppb_text_input_dev.h" |
| +#include "ppapi/c/ppb_text_input_controller.h" |
| #include "ppapi/cpp/instance_handle.h" |
| namespace pp { |
| @@ -15,20 +15,20 @@ namespace pp { |
| class Rect; |
| class Instance; |
| -// This class allows you to associate the PPP_TextInput_Dev and |
| -// PPB_TextInput_Dev C-based interfaces with an object. It associates itself |
| -// with the given instance, and registers as the global handler for handling the |
| -// PPP_TextInput_Dev interface that the browser calls. |
| +// This class allows you to associate the PPP_TextInputController and |
|
yzshen1
2013/07/23 16:48:20
There isn't PPP_TextInputController, right?
I thin
Seigo Nonaka
2013/07/24 09:05:37
Yes! Thanks.
Removed.
|
| +// PPB_TextInputController C-based interfaces with an object. It associates |
| +// itself with the given instance, and registers as the global handler for |
| +// handling the PPP_TextInputController interface that the browser calls. |
| // |
| // You would typically use this either via inheritance on your instance: |
| -// class MyInstance : public pp::Instance, public pp::TextInput_Dev { |
| -// MyInstance() : pp::TextInput_Dev(this) { |
| +// class MyInstance : public pp::Instance, public pp::TextInputController { |
| +// MyInstance() : pp::TextInputController(this) { |
| // } |
| // ... |
| // }; |
| // |
| // or by composition: |
| -// class MyTextInput : public pp::TextInput_Dev { |
| +// class MyTextInput : public pp::TextInputController { |
| // ... |
| // }; |
| // |
| @@ -38,17 +38,14 @@ class Instance; |
| // |
| // MyTextInput text_input_; |
| // }; |
| -class TextInput_Dev { |
| +class TextInputController { |
| public: |
| - explicit TextInput_Dev(Instance* instance); |
| - virtual ~TextInput_Dev(); |
| - |
| - virtual void RequestSurroundingText(uint32_t desired_number_of_characters); |
| + explicit TextInputController(Instance* instance); |
|
yzshen1
2013/07/23 16:48:20
I think usually cpp class constructors take const
Seigo Nonaka
2013/07/24 09:05:37
Done.
|
| + virtual ~TextInputController(); |
|
yzshen1
2013/07/23 16:48:20
Please remove virtual.
Seigo Nonaka
2013/07/24 09:05:37
Done.
|
| void SetTextInputType(PP_TextInput_Type type); |
| void UpdateCaretPosition(const Rect& caret, const Rect& bounding_box); |
| void CancelCompositionText(); |
| - void SelectionChanged(); |
| void UpdateSurroundingText(const std::string& text, |
| uint32_t caret, uint32_t anchor); |
| @@ -58,4 +55,4 @@ class TextInput_Dev { |
| } // namespace pp |
| -#endif // PPAPI_CPP_DEV_TEXT_INPUT_DEV_H_ |
| +#endif // PPAPI_CPP_TEXT_INPUT_CONTROLLER_H_ |