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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

Issue 7621010: Never submit: tentative Pepper IME. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: snapshot. 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
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 48f9019c0b26f0e3b5f8fb1fac3e7dc80d1cedbb..042c0bbd352e6365345bb778dae6547e889b3d44 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.h
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h
@@ -22,6 +22,7 @@
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_var.h"
+#include "ppapi/c/ppb_input_event.h"
#include "ppapi/c/ppp_graphics_3d.h"
#include "ppapi/c/ppp_instance.h"
#include "ppapi/shared_impl/function_group_base.h"
@@ -31,6 +32,8 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCanvas.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "ui/gfx/rect.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
@@ -56,6 +59,7 @@ namespace WebKit {
struct WebCursorInfo;
class WebInputEvent;
class WebPluginContainer;
+struct WebCompositionUnderline;
}
namespace ppapi {
@@ -169,6 +173,25 @@ class PluginInstance : public base::RefCounted<PluginInstance>,
PP_Var GetInstanceObject();
void ViewChanged(const gfx::Rect& position, const gfx::Rect& clip);
+ // Handlers for composition events.
+ bool HandleCompositionStart(const string16& text);
+ bool HandleCompositionUpdate(
+ const string16& text,
+ const std::vector<WebKit::WebCompositionUnderline>& underlines,
+ int selection_start,
+ int selection_end);
+ bool HandleCompositionEnd(const string16& text);
+ bool HandleTextInput(const string16& text);
+
+ // Implementation of composition API.
+ void UpdateCaretPosition(const PP_Rect& caret, const PP_Rect& boundingBox);
+ void SetTextInputType(WebKit::WebTextInputType type);
+
+ // Gets the current text input status.
+ WebKit::WebTextInputType text_input_type() const { return text_input_type_; }
+ WebKit::WebRect GetCaretBounds() const;
+ bool CanComposeInline() const;
+
// Notifications about focus changes, see has_webkit_focus_ below.
void SetWebKitFocus(bool has_focus);
void SetContentAreaFocus(bool has_focus);
@@ -354,6 +377,17 @@ class PluginInstance : public base::RefCounted<PluginInstance>,
void DoSetCursor(WebKit::WebCursorInfo* cursor);
+ // Internal helper functions for HandleCompositionXXX().
+ bool SendCompositionEventToPlugin(
+ PP_InputEvent_Type type,
+ const string16& text);
+ bool SendCompositionEventWithUnderlineInformationToPlugin(
+ PP_InputEvent_Type type,
+ const string16& text,
+ const std::vector<WebKit::WebCompositionUnderline>& underlines,
+ int selection_start,
+ int selection_end);
+
PluginDelegate* delegate_;
scoped_refptr<PluginModule> module_;
scoped_ptr< ::ppapi::PPP_Instance_Combined> instance_interface_;
@@ -474,6 +508,12 @@ class PluginInstance : public base::RefCounted<PluginInstance>,
uint32_t input_event_mask_;
uint32_t filtered_input_event_mask_;
+ // Text composition status.
+ WebKit::WebTextInputType text_input_type_;
+ PP_Rect text_input_caret_;
+ PP_Rect text_input_caret_bounds_;
+ bool text_input_caret_set_;
+
PP_CompletionCallback lock_mouse_callback_;
DISALLOW_COPY_AND_ASSIGN(PluginInstance);
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698