Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1729)

Unified Diff: content/renderer/pepper_plugin_delegate_impl.h

Issue 8073021: Implement Pepper IME API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build dependency. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper_plugin_delegate_impl.h
diff --git a/content/renderer/pepper_plugin_delegate_impl.h b/content/renderer/pepper_plugin_delegate_impl.h
index 7410490d15664ec365c90dd9ce92ab7a098c89ba..fa742517cd845198b8be8f0d74cf27cffeec0419 100644
--- a/content/renderer/pepper_plugin_delegate_impl.h
+++ b/content/renderer/pepper_plugin_delegate_impl.h
@@ -17,6 +17,7 @@
#include "content/common/content_export.h"
#include "ppapi/proxy/broker_dispatcher.h"
#include "ppapi/proxy/proxy_channel.h"
+#include "ui/base/ime/text_input_type.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
#include "webkit/plugins/ppapi/ppb_broker_impl.h"
#include "webkit/plugins/ppapi/ppb_flash_menu_impl.h"
@@ -44,6 +45,7 @@ class PluginModule;
}
namespace WebKit {
+struct WebCompositionUnderline;
kochi 2011/10/04 08:52:45 Move after 'class WebMouseEvent;' line.
kinaba 2011/10/05 04:43:19 Done.
class WebFileChooserCompletion;
class WebMouseEvent;
struct WebFileChooserParams;
@@ -166,8 +168,20 @@ class PepperPluginDelegateImpl
// notifies all of the plugins.
void OnSetFocus(bool has_focus);
- // Returns whether or not a Pepper plugin is focused.
+ // IME status.
bool IsPluginFocused() const;
+ gfx::Rect GetCaretBounds() const;
+ ui::TextInputType GetTextInputType() const;
+ bool IsPluginAcceptingCompositionEvents() const;
+ bool CanComposeInline() const;
+
+ // IME events.
+ void OnImeSetComposition(
+ const string16& text,
+ const std::vector<WebKit::WebCompositionUnderline>& underlines,
+ int selection_start,
+ int selection_end);
+ void OnImeConfirmComposition(const string16& text);
// Notification that the request to lock the mouse has completed.
void OnLockMouseACK(bool succeeded);
@@ -179,7 +193,12 @@ class PepperPluginDelegateImpl
bool DispatchLockedMouseEvent(const WebKit::WebMouseEvent& event);
// PluginDelegate implementation.
- virtual void PluginFocusChanged(bool focused) OVERRIDE;
+ virtual void PluginFocusChanged(webkit::ppapi::PluginInstance* instance,
+ bool focused) OVERRIDE;
+ virtual void PluginTextInputTypeChanged(
+ webkit::ppapi::PluginInstance* instance) OVERRIDE;
+ virtual void PluginRequestedCancelComposition(
+ webkit::ppapi::PluginInstance* instance) OVERRIDE;
virtual void PluginCrashed(webkit::ppapi::PluginInstance* instance);
virtual void InstanceCreated(
webkit::ppapi::PluginInstance* instance);
@@ -356,7 +375,10 @@ class PepperPluginDelegateImpl
BrokerMap pending_connect_broker_;
// Whether or not the focus is on a PPAPI plugin
- bool is_pepper_plugin_focused_;
+ webkit::ppapi::PluginInstance* focused_plugin_;
+
+ // Current text input composition text. Empty if no composition is on process.
brettw 2011/10/03 16:46:01 is on process -> is in progress (I think that's wh
kinaba 2011/10/05 04:43:19 Done.
+ string16 composition_text_;
// Set of instances to receive a notification when the enterprise policy has
// been updated.
« no previous file with comments | « no previous file | content/renderer/pepper_plugin_delegate_impl.cc » ('j') | content/renderer/pepper_plugin_delegate_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698