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

Unified Diff: src/shared/ppapi_proxy/plugin_url_loader.cc

Issue 6177007: ppapi_proxy: Support loading and reading urls. Proxy URLLoader.... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 11 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 | « src/shared/ppapi_proxy/plugin_url_loader.h ('k') | src/shared/ppapi_proxy/plugin_var.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/ppapi_proxy/plugin_url_loader.cc
===================================================================
--- src/shared/ppapi_proxy/plugin_url_loader.cc (revision 4123)
+++ src/shared/ppapi_proxy/plugin_url_loader.cc (working copy)
@@ -1,111 +0,0 @@
-/*
- * Copyright 2010 The Native Client 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 "native_client/src/shared/ppapi_proxy/plugin_url_loader.h"
-
-#include <stdio.h>
-#include <string.h>
-#include "srpcgen/ppb_rpc.h"
-#include "native_client/src/include/portability.h"
-#include "native_client/src/shared/ppapi_proxy/plugin_globals.h"
-#include "native_client/src/shared/ppapi_proxy/utility.h"
-#include "native_client/src/shared/srpc/nacl_srpc.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/ppb_url_loader.h"
-
-namespace ppapi_proxy {
-
-namespace {
-PP_Resource Create(PP_Instance instance) {
- UNREFERENCED_PARAMETER(instance);
- return kInvalidResourceId;
-}
-
-PP_Bool IsURLLoader(PP_Resource resource) {
- UNREFERENCED_PARAMETER(resource);
- return PP_FALSE;
-}
-
-int32_t Open(PP_Resource loader,
- PP_Resource request_info,
- struct PP_CompletionCallback callback) {
- UNREFERENCED_PARAMETER(loader);
- UNREFERENCED_PARAMETER(request_info);
- UNREFERENCED_PARAMETER(callback);
- return PP_ERROR_BADRESOURCE;
-}
-
-int32_t FollowRedirect(PP_Resource loader,
- struct PP_CompletionCallback callback) {
- UNREFERENCED_PARAMETER(loader);
- UNREFERENCED_PARAMETER(callback);
- return PP_ERROR_BADRESOURCE;
-}
-
-PP_Bool GetUploadProgress(PP_Resource loader,
- int64_t* bytes_sent,
- int64_t* total_bytes_to_be_sent) {
- UNREFERENCED_PARAMETER(loader);
- UNREFERENCED_PARAMETER(bytes_sent);
- UNREFERENCED_PARAMETER(total_bytes_to_be_sent);
- return PP_FALSE;
-}
-
-PP_Bool GetDownloadProgress(PP_Resource loader,
- int64_t* bytes_received,
- int64_t* total_bytes_to_be_received) {
- UNREFERENCED_PARAMETER(loader);
- UNREFERENCED_PARAMETER(bytes_received);
- UNREFERENCED_PARAMETER(total_bytes_to_be_received);
- return PP_FALSE;
-}
-
-PP_Resource GetResponseInfo(PP_Resource loader) {
- UNREFERENCED_PARAMETER(loader);
- return kInvalidResourceId;
-}
-
-int32_t ReadResponseBody(PP_Resource loader,
- char* buffer,
- int32_t bytes_to_read,
- struct PP_CompletionCallback callback) {
- UNREFERENCED_PARAMETER(loader);
- UNREFERENCED_PARAMETER(buffer);
- UNREFERENCED_PARAMETER(bytes_to_read);
- UNREFERENCED_PARAMETER(callback);
- return PP_ERROR_BADRESOURCE;
-}
-
-int32_t FinishStreamingToFile(PP_Resource loader,
- struct PP_CompletionCallback callback) {
- UNREFERENCED_PARAMETER(loader);
- UNREFERENCED_PARAMETER(callback);
- return PP_ERROR_BADRESOURCE;
-}
-
-void Close(PP_Resource loader) {
- UNREFERENCED_PARAMETER(loader);
-}
-} // namespace
-
-const PPB_URLLoader* PluginURLLoader::GetInterface() {
- static const PPB_URLLoader intf = {
- Create,
- IsURLLoader,
- Open,
- FollowRedirect,
- GetUploadProgress,
- GetDownloadProgress,
- GetResponseInfo,
- ReadResponseBody,
- FinishStreamingToFile,
- Close,
- };
- return &intf;
-}
-
-} // namespace ppapi_proxy
« no previous file with comments | « src/shared/ppapi_proxy/plugin_url_loader.h ('k') | src/shared/ppapi_proxy/plugin_var.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698