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

Unified Diff: ppapi/cpp/dev/text_input_dev.cc

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 10 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/cpp/dev/text_input_dev.h ('k') | ppapi/cpp/dev/transport_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/text_input_dev.cc
diff --git a/ppapi/cpp/dev/text_input_dev.cc b/ppapi/cpp/dev/text_input_dev.cc
index 638883636b3503b24afdd2503afdfe6467b29676..6783892ca74e315240abbd7c300fde6a6e68a34f 100644
--- a/ppapi/cpp/dev/text_input_dev.cc
+++ b/ppapi/cpp/dev/text_input_dev.cc
@@ -4,7 +4,7 @@
#include "ppapi/cpp/dev/text_input_dev.h"
-#include "ppapi/cpp/instance.h"
+#include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/module_impl.h"
#include "ppapi/cpp/rect.h"
@@ -19,7 +19,8 @@ template <> const char* interface_name<PPB_TextInput_Dev>() {
} // namespace
-TextInput_Dev::TextInput_Dev(Instance* instance) : instance_(instance) {
+TextInput_Dev::TextInput_Dev(const InstanceHandle& instance)
+ : instance_(instance) {
}
TextInput_Dev::~TextInput_Dev() {
@@ -29,7 +30,7 @@ void TextInput_Dev::SetTextInputType(PP_TextInput_Type type) {
if (!has_interface<PPB_TextInput_Dev>())
return;
get_interface<PPB_TextInput_Dev>()->SetTextInputType(
- instance_->pp_instance(), type);
+ instance_.pp_instance(), type);
}
void TextInput_Dev::UpdateCaretPosition(const Rect& caret,
@@ -37,14 +38,14 @@ void TextInput_Dev::UpdateCaretPosition(const Rect& caret,
if (!has_interface<PPB_TextInput_Dev>())
return;
get_interface<PPB_TextInput_Dev>()->UpdateCaretPosition(
- instance_->pp_instance(), &caret.pp_rect(), &bounding_box.pp_rect());
+ instance_.pp_instance(), &caret.pp_rect(), &bounding_box.pp_rect());
}
void TextInput_Dev::CancelCompositionText() {
if (!has_interface<PPB_TextInput_Dev>())
return;
get_interface<PPB_TextInput_Dev>()->CancelCompositionText(
- instance_->pp_instance());
+ instance_.pp_instance());
}
} // namespace pp
« no previous file with comments | « ppapi/cpp/dev/text_input_dev.h ('k') | ppapi/cpp/dev/transport_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698