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

Unified Diff: tests/fake_browser_ppapi/fake_object.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_nacl_private.cc ('k') | tests/fake_browser_ppapi/fake_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/fake_browser_ppapi/fake_object.h
===================================================================
--- tests/fake_browser_ppapi/fake_object.h (revision 6005)
+++ tests/fake_browser_ppapi/fake_object.h (working copy)
@@ -1,89 +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_FAKE_OBJECT_H_
-#define NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_OBJECT_H_
-
-#include <map>
-#include <string>
-#include "ppapi/c/dev/ppp_class_deprecated.h"
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_module.h"
-#include "ppapi/c/pp_var.h"
-
-#include "native_client/src/include/nacl_macros.h"
-#include "native_client/src/shared/ppapi_proxy/object.h"
-
-namespace fake_browser_ppapi {
-
-// Implements a scriptable object in PPAPI.
-class Object : public ppapi_proxy::Object {
- public:
- virtual ~Object() {}
- // The bindings for the methods invoked by the PPAPI interface.
- virtual bool HasProperty(PP_Var name,
- PP_Var* exception);
- virtual bool HasMethod(PP_Var name,
- PP_Var* exception);
- virtual PP_Var GetProperty(PP_Var name,
- PP_Var* exception);
- virtual void GetAllPropertyNames(uint32_t* property_count,
- PP_Var** properties,
- PP_Var* exception);
- virtual void SetProperty(PP_Var name,
- PP_Var value,
- PP_Var* exception);
- virtual void RemoveProperty(PP_Var name,
- PP_Var* exception);
- virtual PP_Var Call(PP_Var method_name,
- uint32_t argc,
- PP_Var* argv,
- PP_Var* exception);
- virtual PP_Var Construct(uint32_t argc,
- PP_Var* argv,
- PP_Var* exception);
- virtual void Deallocate();
-
- typedef std::map<std::string, PP_Var*> PropertyMap;
- typedef PP_Var (*Method)(Object* object,
- uint32_t argc,
- PP_Var* argv,
- PP_Var* exception);
- typedef std::map<std::string, Method> MethodMap;
-
- // Create a PP_Var object with a set of initial properties.
- static PP_Var New(PP_Module module,
- PP_Instance instance,
- const PropertyMap& properties,
- const MethodMap& methods);
-
- // Construct using a map of initial properties.
- Object(PP_Module module,
- PP_Instance instance,
- const PropertyMap& properties,
- const MethodMap& methods);
-
- PropertyMap* properties() { return &properties_; }
- MethodMap* methods() { return &methods_; }
- PP_Module module() const { return module_; }
- PP_Instance instance() { return instance_; }
-
- private:
- // Maintains the list of properties for Set/Get/Remove.
- PropertyMap properties_;
- // Maintains the list of methods that can be invoked by Call.
- MethodMap methods_;
- // Keep track of the PP_Module that created us.
- PP_Module module_;
- // Keep track of the PP_Instance that created us.
- PP_Instance instance_;
-
- NACL_DISALLOW_COPY_AND_ASSIGN(Object);
-};
-
-} // namespace fake_browser_ppapi
-
-#endif // NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_OBJECT_H_
« no previous file with comments | « tests/fake_browser_ppapi/fake_nacl_private.cc ('k') | tests/fake_browser_ppapi/fake_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698