Index: webkit/plugins/ppapi/ppapi_plugin_instance.h |
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.h b/webkit/plugins/ppapi/ppapi_plugin_instance.h |
index 284d6a31e7272bde1f2769ee0adadc515aa3d4a5..3b5bf5eef6d85e3d739797816f94879278099187 100644 |
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.h |
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h |
@@ -20,6 +20,7 @@ |
#include "ppapi/c/dev/ppp_printing_dev.h" |
#include "ppapi/c/dev/ppp_find_dev.h" |
#include "ppapi/c/dev/ppp_selection_dev.h" |
+#include "ppapi/c/dev/ppp_text_input_dev.h" |
#include "ppapi/c/dev/ppp_zoom_dev.h" |
#include "ppapi/c/pp_completion_callback.h" |
#include "ppapi/c/pp_instance.h" |
@@ -64,6 +65,10 @@ struct PPP_Instance_Combined; |
class Resource; |
} |
+namespace ui { |
+class Range; |
+} |
+ |
namespace webkit { |
namespace ppapi { |
@@ -180,11 +185,15 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance : |
void UpdateCaretPosition(const gfx::Rect& caret, |
const gfx::Rect& bounding_box); |
void SetTextInputType(ui::TextInputType type); |
+ void SelectionChanged(); |
+ void UpdateSurroundingText(const std::string& text, |
+ size_t caret, size_t anchor); |
// Gets the current text input status. |
ui::TextInputType text_input_type() const { return text_input_type_; } |
gfx::Rect GetCaretBounds() const; |
bool IsPluginAcceptingCompositionEvents() const; |
+ void GetSurroundingText(string16* text, ui::Range* range) const; |
// Notifications about focus changes, see has_webkit_focus_ below. |
void SetWebKitFocus(bool has_focus); |
@@ -216,6 +225,7 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance : |
string16 GetSelectedText(bool html); |
string16 GetLinkAtPosition(const gfx::Point& point); |
+ bool RequestSurroundingText(size_t desired_number_of_characters); |
void Zoom(double factor, bool text_only); |
bool StartFind(const string16& search_text, |
bool case_sensitive, |
@@ -396,6 +406,7 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance : |
bool LoadPrintInterface(); |
bool LoadPrivateInterface(); |
bool LoadSelectionInterface(); |
+ bool LoadTextInputInterface(); |
bool LoadZoomInterface(); |
// Determines if we think the plugin has focus, both content area and webkit |
@@ -524,6 +535,7 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance : |
const PPP_Instance_Private* plugin_private_interface_; |
const PPP_Pdf* plugin_pdf_interface_; |
const PPP_Selection_Dev* plugin_selection_interface_; |
+ const PPP_TextInput_Dev* plugin_textinput_interface_; |
const PPP_Zoom_Dev* plugin_zoom_interface_; |
// Flags indicating whether we have asked this plugin instance for the |
@@ -618,6 +630,11 @@ class WEBKIT_PLUGINS_EXPORT PluginInstance : |
gfx::Rect text_input_caret_bounds_; |
bool text_input_caret_set_; |
+ // Text selection status. |
+ std::string surrounding_text_; |
+ size_t selection_caret_; |
+ size_t selection_anchor_; |
+ |
PP_CompletionCallback lock_mouse_callback_; |
DISALLOW_COPY_AND_ASSIGN(PluginInstance); |