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

Unified Diff: ppapi/cpp/dev/ime_input_event_dev.h

Issue 10391101: Test for Pepper IME events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments from kochi & merge master. Created 8 years, 7 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 | « ppapi/c/dev/ppb_ime_input_event_dev.h ('k') | ppapi/cpp/dev/ime_input_event_dev.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/ime_input_event_dev.h
diff --git a/ppapi/cpp/dev/ime_input_event_dev.h b/ppapi/cpp/dev/ime_input_event_dev.h
index 17216a86cc727ea86e4219271b132b9247488e21..8ed8dff35ceb822b7cffeb49e5e5a6d360c4e42d 100644
--- a/ppapi/cpp/dev/ime_input_event_dev.h
+++ b/ppapi/cpp/dev/ime_input_event_dev.h
@@ -6,6 +6,7 @@
#define PPAPI_CPP_DEV_IME_INPUT_EVENT_DEV_H_
#include <utility>
+#include <vector>
#include "ppapi/c/dev/ppb_ime_input_event_dev.h"
#include "ppapi/cpp/input_event.h"
@@ -29,6 +30,34 @@ class IMEInputEvent_Dev : public InputEvent {
/// @param[in] event A generic input event.
explicit IMEInputEvent_Dev(const InputEvent& event);
+ /// This constructor manually constructs an IME event from the provided
+ /// parameters.
+ ///
+ /// @param[in] instance The instance for which this event occurred.
+ ///
+ /// @param[in] type A <code>PP_InputEvent_Type</code> identifying the type of
+ /// input event. The type must be one of the ime event types.
+ ///
+ /// @param[in] time_stamp A <code>PP_TimeTicks</code> indicating the time
+ /// when the event occurred.
+ ///
+ /// @param[in] text The string returned by <code>GetText</code>.
+ ///
+ /// @param[in] segment_offsets The array of numbers returned by
+ /// <code>GetSegmentOffset</code>.
+ ///
+ /// @param[in] target_segment The number returned by
+ /// <code>GetTargetSegment</code>.
+ ///
+ /// @param[in] selection The range returned by <code>GetSelection</code>.
+ IMEInputEvent_Dev(const InstanceHandle& instance,
+ PP_InputEvent_Type type,
+ PP_TimeTicks time_stamp,
+ Var text,
+ const std::vector<uint32_t>& segment_offsets,
+ int32_t target_segment,
+ const std::pair<uint32_t, uint32_t>& selection);
+
/// Returns the composition text as a UTF-8 string for the given IME event.
///
/// @return A string var representing the composition text. For non-IME
« no previous file with comments | « ppapi/c/dev/ppb_ime_input_event_dev.h ('k') | ppapi/cpp/dev/ime_input_event_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698