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

Unified Diff: webkit/plugins/ppapi/ppb_websocket_impl.cc

Issue 8826011: Remove PP_Module from parameters for PPB_Var.VarFromUtf8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indentation. Created 9 years 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
« ppapi/cpp/var.cc ('K') | « webkit/plugins/ppapi/ppb_var_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_websocket_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_websocket_impl.cc b/webkit/plugins/ppapi/ppb_websocket_impl.cc
index f8fb1900f8feca7b8e4882e6596addef99ca12cc..a2ec871109967cd12e5f899ef335cb370c4a1d9d 100644
--- a/webkit/plugins/ppapi/ppb_websocket_impl.cc
+++ b/webkit/plugins/ppapi/ppb_websocket_impl.cc
@@ -84,8 +84,7 @@ PPB_WebSocket_Impl::PPB_WebSocket_Impl(PP_Instance instance)
close_was_clean_(PP_FALSE),
buffered_amount_(0),
buffered_amount_after_close_(0) {
- empty_string_ = new StringVar(
- PpapiGlobals::Get()->GetModuleForInstance(instance), "", 0);
+ empty_string_ = new StringVar("", 0);
}
PPB_WebSocket_Impl::~PPB_WebSocket_Impl() {
@@ -133,8 +132,7 @@ int32_t PPB_WebSocket_Impl::Connect(PP_Var url,
if (!url_string)
return PP_ERROR_BADARGUMENT;
GURL gurl(url_string->value());
- url_ = new StringVar(
- PpapiGlobals::Get()->GetModuleForInstance(pp_instance()), gurl.spec());
+ url_ = new StringVar(gurl.spec());
if (!gurl.is_valid())
return PP_ERROR_BADARGUMENT;
if (!gurl.SchemeIs("ws") && !gurl.SchemeIs("wss"))
@@ -353,8 +351,7 @@ PP_Var PPB_WebSocket_Impl::GetProtocol() {
return empty_string_->GetPPVar();
std::string protocol = websocket_->subprotocol().utf8();
- return StringVar::StringToPPVar(
- PpapiGlobals::Get()->GetModuleForInstance(pp_instance()), protocol);
+ return StringVar::StringToPPVar(protocol);
}
PP_WebSocketReadyState_Dev PPB_WebSocket_Impl::GetReadyState() {
@@ -380,8 +377,7 @@ void PPB_WebSocket_Impl::didReceiveMessage(const WebString& message) {
// Append received data to queue.
std::string string = message.utf8();
- PP_Var var = StringVar::StringToPPVar(
- PpapiGlobals::Get()->GetModuleForInstance(pp_instance()), string);
+ PP_Var var = StringVar::StringToPPVar(string);
received_messages_.push(var);
if (!wait_for_receive_)
@@ -435,8 +431,7 @@ void PPB_WebSocket_Impl::didClose(unsigned long unhandled_buffered_amount,
// Store code and reason.
close_code_ = code;
std::string reason_string = reason.utf8();
- close_reason_ = new StringVar(
- PpapiGlobals::Get()->GetModuleForInstance(pp_instance()), reason_string);
+ close_reason_ = new StringVar(reason_string);
// Set close_was_clean_.
bool was_clean =
« ppapi/cpp/var.cc ('K') | « webkit/plugins/ppapi/ppb_var_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698