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

Unified Diff: tests/fake_browser_ppapi/fake_resource.h

Issue 7292002: Remove plugin connection to PPAPI scriptable objects (var deprecated). Also (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 5 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 | « tests/fake_browser_ppapi/fake_object.cc ('k') | tests/fake_browser_ppapi/fake_resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/fake_browser_ppapi/fake_resource.h
===================================================================
--- tests/fake_browser_ppapi/fake_resource.h (revision 6005)
+++ tests/fake_browser_ppapi/fake_resource.h (working copy)
@@ -1,59 +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.
- */
-
-#ifndef NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_RESOURCE_H_
-#define NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_RESOURCE_H_
-
-#include "native_client/src/include/nacl_macros.h"
-#include "ppapi/c/ppb_url_response_info.h"
-
-namespace fake_browser_ppapi {
-
-class URLLoader;
-class URLRequestInfo;
-class URLResponseInfo;
-class FileIO;
-class FileRef;
-
-// Represents a generic resource tracked by the Host.
-// The C API functions usually start by mapping a PP_Resource id to a Resource
-// and then access and modify its state.
-// This is a simplified version of Chrome's pepper::Resource.
-class Resource {
- public:
- Resource() : resource_id_(0) {}
- virtual ~Resource() {}
-
- void set_resource_id(PP_Resource resource_id) { resource_id_ = resource_id; }
- PP_Resource resource_id() const { return resource_id_; }
-
- // This will allow us to safely cast Resource to derived types.
- // The derived classes must therefore override their respective methods to
- // return |this|.
- virtual URLLoader* AsURLLoader() { return NULL; }
- virtual URLRequestInfo* AsURLRequestInfo() { return NULL; }
- virtual URLResponseInfo* AsURLResponseInfo() { return NULL; }
- virtual FileIO* AsFileIO() { return NULL; }
- virtual FileRef* AsFileRef() { return NULL; }
-
- static Resource* Invalid() { return &kInvalidResource; }
-
- private:
- PP_Resource resource_id_;
-
- static Resource kInvalidResource;
- NACL_DISALLOW_COPY_AND_ASSIGN(Resource);
-};
-
-// These are made global so that C API functions can access them from any file.
-// To be implemented by main.cc.
-PP_Resource TrackResource(Resource* resource);
-// Returns Resource::Invalid() on error.
-Resource* GetResource(PP_Resource resource_id);
-
-} // namespace fake_browser_ppapi
-
-#endif // NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_RESOURCE_H_
« no previous file with comments | « tests/fake_browser_ppapi/fake_object.cc ('k') | tests/fake_browser_ppapi/fake_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698