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

Unified Diff: ppapi/cpp/text_input_controller.h

Issue 18671004: PPAPI: Move IMEInputEvent and TextInput to stable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing comments Created 7 years, 5 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: ppapi/cpp/text_input_controller.h
diff --git a/ppapi/cpp/text_input_controller.h b/ppapi/cpp/text_input_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..e12c53b8c81102c30e04b9cf0e1afca39d853e58
--- /dev/null
+++ b/ppapi/cpp/text_input_controller.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PPAPI_CPP_TEXT_INPUT_CONTROLLER_H_
+#define PPAPI_CPP_TEXT_INPUT_CONTROLLER_H_
+
+#include <string>
+
+#include "ppapi/c/ppb_text_input_controller.h"
+#include "ppapi/cpp/instance_handle.h"
+
+namespace pp {
+
+class Rect;
+class Instance;
+
+class TextInputController {
+ public:
+ explicit TextInputController(const InstanceHandle& instance);
+ ~TextInputController();
+
+ void SetTextInputType(PP_TextInput_Type type);
+ void UpdateCaretPosition(const Rect& caret, const Rect& bounding_box);
+ void CancelCompositionText();
+ void UpdateSurroundingText(const std::string& text,
+ uint32_t caret, uint32_t anchor);
+
+ private:
+ InstanceHandle instance_;
+};
+
+} // namespace pp
+
+#endif // PPAPI_CPP_TEXT_INPUT_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698