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

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

Issue 9619021: WebSocket Pepper API: Implement extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for the final review (revised) Created 8 years, 9 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
« ppapi/tests/test_websocket.cc ('K') | « webkit/plugins/ppapi/ppb_websocket_impl.h ('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 0a55e524c522055790fb94de29aefefa708ee913..e71145fd632adbf5203f6597f1e16cff247c45d0 100644
--- a/webkit/plugins/ppapi/ppb_websocket_impl.cc
+++ b/webkit/plugins/ppapi/ppb_websocket_impl.cc
@@ -8,7 +8,6 @@
#include <string>
#include "base/basictypes.h"
-#include "base/logging.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "ppapi/c/pp_completion_callback.h"
@@ -386,11 +385,12 @@ PP_Bool PPB_WebSocket_Impl::GetCloseWasClean() {
}
PP_Var PPB_WebSocket_Impl::GetExtensions() {
- // TODO(toyoshim): For now, always returns empty string because WebKit side
- // doesn't support it yet.
- if (!extensions_)
+ // Check mandatory interfaces.
+ if (!websocket_.get())
return empty_string_->GetPPVar();
- return extensions_->GetPPVar();
+
+ std::string extensions = websocket_->extensions().utf8();
+ return StringVar::StringToPPVar(extensions);
}
PP_Var PPB_WebSocket_Impl::GetProtocol() {
« ppapi/tests/test_websocket.cc ('K') | « webkit/plugins/ppapi/ppb_websocket_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698