diff options
author | kinaba@google.com <kinaba@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-30 07:05:57 +0000 |
---|---|---|
committer | kinaba@google.com <kinaba@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-30 07:05:57 +0000 |
commit | 56ea1a632a03756008dcc5b608f87704c231d735 (patch) | |
tree | 8a7c4784c2d42a94c8def3f9028b8c5d898f8d5b /content/renderer/pepper_plugin_delegate_impl.cc | |
parent | 9522abfe553ccbe114e94e13aceaa82b0a8e4bf7 (diff) | |
download | chromium_src-56ea1a632a03756008dcc5b608f87704c231d735.zip chromium_src-56ea1a632a03756008dcc5b608f87704c231d735.tar.gz chromium_src-56ea1a632a03756008dcc5b608f87704c231d735.tar.bz2 |
The first step for enabling off-the-spot IME on Pepper on ChromeOS/Linux.
BUG=83684
TEST=Go to http://weathernews.jp with pepper flash plug in enabled.
Focus the text input field and type something with IME on.
Verify that the candidate window is shown somewhere on the screen
and commited text is entered in the text field.
This patch is the first step toward off-the-spot IME on Pepper plugins
hosted on RenderWidgetHostViewGtk. This patch:
- Makes it possible to turn on/off IME when a plugin is focused.
- Makes it possible for the plugin to receive committed results from IME.
What are NOT IN this patch (and what I hope to improve in forthcoming
separate patches) are:
- Proper placement of the candidate window.
- Showing preedit texts.
Review URL: http://codereview.chromium.org/6990072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87215 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/pepper_plugin_delegate_impl.cc')
-rw-r--r-- | content/renderer/pepper_plugin_delegate_impl.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc index 74f091c..b20c2b9 100644 --- a/content/renderer/pepper_plugin_delegate_impl.cc +++ b/content/renderer/pepper_plugin_delegate_impl.cc @@ -564,7 +564,8 @@ PepperPluginDelegateImpl::PepperPluginDelegateImpl(RenderView* render_view) : render_view_(render_view), has_saved_context_menu_action_(false), saved_context_menu_action_(0), - id_generator_(0) { + id_generator_(0), + is_pepper_plugin_focused_(false) { } PepperPluginDelegateImpl::~PepperPluginDelegateImpl() { @@ -740,6 +741,12 @@ PepperPluginDelegateImpl::GetBitmapForOptimizedPluginPaint( return NULL; } +void PepperPluginDelegateImpl::PluginFocusChanged(bool focused) { + is_pepper_plugin_focused_ = focused; + if (render_view_) + render_view_->PpapiPluginFocusChanged(); +} + void PepperPluginDelegateImpl::PluginCrashed( webkit::ppapi::PluginInstance* instance) { render_view_->PluginCrashed(instance->module()->path()); @@ -911,6 +918,10 @@ void PepperPluginDelegateImpl::OnSetFocus(bool has_focus) { (*i)->SetContentAreaFocus(has_focus); } +bool PepperPluginDelegateImpl::IsPluginFocused() const { + return is_pepper_plugin_focused_; +} + bool PepperPluginDelegateImpl::OpenFileSystem( const GURL& url, fileapi::FileSystemType type, |