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

Unified Diff: src/trusted/plugin/array_ppapi.h

Issue 7799028: Remove src/trusted/plugin (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fix gyp file for necessary -I Created 9 years, 4 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/trusted/plugin/arch_x86/sandbox_isa.cc ('k') | src/trusted/plugin/array_ppapi.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/plugin/array_ppapi.h
diff --git a/src/trusted/plugin/array_ppapi.h b/src/trusted/plugin/array_ppapi.h
deleted file mode 100644
index 60d6db259a8f350d4dce2c1d53960458848390c9..0000000000000000000000000000000000000000
--- a/src/trusted/plugin/array_ppapi.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2011 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_SRC_TRUSTED_PLUGIN_ARRAY_PPAPI_H_
-#define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_ARRAY_PPAPI_H_
-
-#include <vector>
-
-#include "native_client/src/include/checked_cast.h"
-#include "native_client/src/include/nacl_macros.h"
-#include "native_client/src/trusted/plugin/plugin.h"
-#include "ppapi/cpp/dev/scriptable_object_deprecated.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/private/var_private.h"
-
-namespace plugin {
-
-// Wraps a JavaScript array where each element is an indexed property.
-// Can be used to represent single arguments and return values of array type
-// as well as multiple return values from invoking SRPC methods.
-class ArrayPpapi : public pp::deprecated::ScriptableObject {
- public:
- explicit ArrayPpapi(Plugin* instance);
- virtual ~ArrayPpapi() {}
-
- virtual bool HasProperty(const pp::Var& name, pp::Var* exception) {
- return js_array_.HasProperty(name, exception);
- }
- virtual pp::Var GetProperty(const pp::Var& name, pp::Var* exception) {
- return js_array_.GetProperty(name, exception);
- }
- virtual void GetAllPropertyNames(std::vector<pp::Var>* properties,
- pp::Var* exception) {
- js_array_.GetAllPropertyNames(properties, exception);
- }
- virtual void SetProperty(const pp::Var& name,
- const pp::Var& value, pp::Var* exception) {
- js_array_.SetProperty(name, value, exception);
- }
- virtual void RemoveProperty(const pp::Var& name, pp::Var* exception) {
- js_array_.RemoveProperty(name, exception);
- }
- virtual pp::Var Call(const pp::Var& method_name,
- const std::vector<pp::Var>& args, pp::Var* exception) {
- // Assuming the number of arguments will fit into 32 bits.
- uint32_t argc = nacl::assert_cast<uint32_t>(args.size());
- pp::Var* argv = const_cast<pp::Var*>(&args[0]); // elements are contiguous
- return js_array_.Call(method_name, argc, argv, exception);
- }
-
- private:
- NACL_DISALLOW_COPY_AND_ASSIGN(ArrayPpapi);
-
- pp::VarPrivate js_array_;
-};
-
-} // namespace plugin
-
-#endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_ARRAY_PPAPI_H_
« no previous file with comments | « src/trusted/plugin/arch_x86/sandbox_isa.cc ('k') | src/trusted/plugin/array_ppapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698