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

Unified Diff: ppapi/thunk/ppb_text_input_thunk.cc

Issue 10170014: Move text input API to Instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/thunk/ppb_text_input_thunk.cc
diff --git a/ppapi/thunk/ppb_text_input_thunk.cc b/ppapi/thunk/ppb_text_input_thunk.cc
index b5b1753d9b5470099929fd4bd906f21827b9034a..7d35e2a799fbb3f8b1e1b54b14182fc49233798b 100644
--- a/ppapi/thunk/ppb_text_input_thunk.cc
+++ b/ppapi/thunk/ppb_text_input_thunk.cc
@@ -4,7 +4,7 @@
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/thunk.h"
-#include "ppapi/thunk/ppb_text_input_api.h"
+#include "ppapi/thunk/ppb_instance_api.h"
namespace ppapi {
namespace thunk {
@@ -12,7 +12,7 @@ namespace thunk {
namespace {
void SetTextInputType(PP_Instance instance, PP_TextInput_Type type) {
- EnterFunction<PPB_TextInput_FunctionAPI> enter(instance, true);
+ EnterInstance enter(instance);
if (enter.succeeded())
enter.functions()->SetTextInputType(instance, type);
}
@@ -20,26 +20,26 @@ void SetTextInputType(PP_Instance instance, PP_TextInput_Type type) {
void UpdateCaretPosition(PP_Instance instance,
const PP_Rect* caret,
const PP_Rect* bounding_box) {
- EnterFunction<PPB_TextInput_FunctionAPI> enter(instance, true);
+ EnterInstance enter(instance);
if (enter.succeeded() && caret && bounding_box)
enter.functions()->UpdateCaretPosition(instance, *caret, *bounding_box);
}
void CancelCompositionText(PP_Instance instance) {
- EnterFunction<PPB_TextInput_FunctionAPI> enter(instance, true);
+ EnterInstance enter(instance);
if (enter.succeeded())
enter.functions()->CancelCompositionText(instance);
}
void UpdateSurroundingText(PP_Instance instance, const char* text,
uint32_t caret, uint32_t anchor) {
- EnterFunction<PPB_TextInput_FunctionAPI> enter(instance, true);
+ EnterInstance enter(instance);
if (enter.succeeded())
enter.functions()->UpdateSurroundingText(instance, text, caret, anchor);
}
void SelectionChanged(PP_Instance instance) {
- EnterFunction<PPB_TextInput_FunctionAPI> enter(instance, true);
+ EnterInstance enter(instance);
if (enter.succeeded())
enter.functions()->SelectionChanged(instance);
}

Powered by Google App Engine
This is Rietveld 408576698