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

Unified Diff: webkit/glue/plugins/pepper_url_response_info.cc

Issue 2859023: Boilerplate implementation of the Pepper URL Loader API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | « webkit/glue/plugins/pepper_url_response_info.h ('k') | webkit/glue/plugins/pepper_var.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_url_response_info.cc
===================================================================
--- webkit/glue/plugins/pepper_url_response_info.cc (revision 0)
+++ webkit/glue/plugins/pepper_url_response_info.cc (revision 0)
@@ -0,0 +1,59 @@
+// Copyright (c) 2010 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.
+
+#include "webkit/glue/plugins/pepper_url_response_info.h"
+
+#include "base/logging.h"
+#include "third_party/ppapi/c/pp_var.h"
+#include "webkit/glue/plugins/pepper_resource_tracker.h"
+
+namespace pepper {
+
+namespace {
+
+bool IsURLResponseInfo(PP_Resource resource) {
+ return !!ResourceTracker::Get()->GetAsURLResponseInfo(resource).get();
+}
+
+PP_Var GetProperty(PP_Resource response_id,
+ PP_URLResponseProperty property) {
+ scoped_refptr<URLResponseInfo> response(
+ ResourceTracker::Get()->GetAsURLResponseInfo(response_id));
+ if (!response.get())
+ return PP_MakeVoid();
+
+ return response->GetProperty(property);
+}
+
+PP_Resource GetBody(PP_Resource response_id) {
+ NOTIMPLEMENTED(); // TODO(darin): Implement me!
+ return 0;
+}
+
+const PPB_URLResponseInfo ppb_urlresponseinfo = {
+ &IsURLResponseInfo,
+ &GetProperty,
+ &GetBody
+};
+
+} // namespace
+
+URLResponseInfo::URLResponseInfo(PluginModule* module)
+ : Resource(module) {
+}
+
+URLResponseInfo::~URLResponseInfo() {
+}
+
+// static
+const PPB_URLResponseInfo* URLResponseInfo::GetInterface() {
+ return &ppb_urlresponseinfo;
+}
+
+PP_Var URLResponseInfo::GetProperty(PP_URLResponseProperty property) {
+ NOTIMPLEMENTED(); // TODO(darin): Implement me!
+ return PP_MakeVoid();
+}
+
+} // namespace pepper
Property changes on: webkit\glue\plugins\pepper_url_response_info.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « webkit/glue/plugins/pepper_url_response_info.h ('k') | webkit/glue/plugins/pepper_var.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698