summaryrefslogtreecommitdiffstats
path: root/webkit/plugins
diff options
context:
space:
mode:
authorkinaba@google.com <kinaba@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-24 19:31:37 +0000
committerkinaba@google.com <kinaba@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-24 19:31:37 +0000
commit1bdccb88f91e6dc6915315c7b1c98459cc4a01dc (patch)
treea40d5edac71adfcea2e01c3ca97d36ca33452a72 /webkit/plugins
parent41e15abb07b747b5827704e3c56ef4dfe62c3e3a (diff)
downloadchromium_src-1bdccb88f91e6dc6915315c7b1c98459cc4a01dc.zip
chromium_src-1bdccb88f91e6dc6915315c7b1c98459cc4a01dc.tar.gz
chromium_src-1bdccb88f91e6dc6915315c7b1c98459cc4a01dc.tar.bz2
Merge 106796 - Handle the change from CaretBounds to SelectionBounds for PPAPI Plugins.
BUG=101173 TEST=Manual: run ppapi_example_ime and verify the candidate window to pop up in a correct place, or open a Flash website with text field on Chrome OS, and verify that the candidate window is displayed in the bottom-left corner of the Flash rect. This CL is to reflect the refactoring http://crrev.com/105699 on IPCs also for Pepper plugins, and make IME candidate windows to be displayed on intended positions. Review URL: http://codereview.chromium.org/8363015 TBR=kinaba@chromium.org Review URL: http://codereview.chromium.org/8382011 git-svn-id: svn://svn.chromium.org/chrome/branches/912/src@106957 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.cc3
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.h1
-rw-r--r--webkit/plugins/ppapi/plugin_delegate.h3
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc2
4 files changed, 9 insertions, 0 deletions
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.cc b/webkit/plugins/ppapi/mock_plugin_delegate.cc
index 060284c..c100c32 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.cc
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.cc
@@ -25,6 +25,9 @@ void MockPluginDelegate::PluginFocusChanged(PluginInstance* instance,
void MockPluginDelegate::PluginTextInputTypeChanged(PluginInstance* instance) {
}
+void MockPluginDelegate::PluginCaretPositionChanged(PluginInstance* instance) {
+}
+
void MockPluginDelegate::PluginRequestedCancelComposition(
PluginInstance* instance) {
}
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.h b/webkit/plugins/ppapi/mock_plugin_delegate.h
index 523973b..5951ba9 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.h
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.h
@@ -17,6 +17,7 @@ class MockPluginDelegate : public PluginDelegate {
virtual void PluginFocusChanged(PluginInstance* instance, bool focused);
virtual void PluginTextInputTypeChanged(PluginInstance* instance);
+ virtual void PluginCaretPositionChanged(PluginInstance* instance);
virtual void PluginRequestedCancelComposition(PluginInstance* instance);
virtual void PluginCrashed(PluginInstance* instance);
virtual void InstanceCreated(PluginInstance* instance);
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h
index e9c0258..01f3f95 100644
--- a/webkit/plugins/ppapi/plugin_delegate.h
+++ b/webkit/plugins/ppapi/plugin_delegate.h
@@ -251,6 +251,9 @@ class PluginDelegate {
// Notification that the text input status of the given plugin is changed.
virtual void PluginTextInputTypeChanged(
webkit::ppapi::PluginInstance* instance) = 0;
+ // Notification that the caret position in the given plugin is changed.
+ virtual void PluginCaretPositionChanged(
+ webkit::ppapi::PluginInstance* instance) = 0;
// Notification that the plugin requested to cancel the current composition.
virtual void PluginRequestedCancelComposition(
webkit::ppapi::PluginInstance* instance) = 0;
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 5ec687d..14724c8 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -629,10 +629,12 @@ void PluginInstance::UpdateCaretPosition(const gfx::Rect& caret,
text_input_caret_ = caret;
text_input_caret_bounds_ = bounding_box;
text_input_caret_set_ = true;
+ delegate()->PluginCaretPositionChanged(this);
}
void PluginInstance::SetTextInputType(ui::TextInputType type) {
text_input_type_ = type;
+ delegate()->PluginTextInputTypeChanged(this);
}
bool PluginInstance::IsPluginAcceptingCompositionEvents() const {