1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef TESTS_NACL_IO_TEST_FAKE_VAR_ARRAY_INTERFACE_H_ 6 #define TESTS_NACL_IO_TEST_FAKE_VAR_ARRAY_INTERFACE_H_ 7 8 #include "nacl_io/pepper_interface.h" 9 #include "sdk_util/macros.h" 10 11 class FakeVarManager; 12 13 class FakeVarArrayInterface : public nacl_io::VarArrayInterface { 14 public: 15 explicit FakeVarArrayInterface(FakeVarManager* manager); 16 17 virtual PP_Var Create(); 18 virtual PP_Var Get(PP_Var array, uint32_t index); 19 virtual PP_Bool Set(PP_Var array, uint32_t index, PP_Var value); 20 virtual uint32_t GetLength(PP_Var array); 21 virtual PP_Bool SetLength(PP_Var array, uint32_t length); 22 23 private: 24 FakeVarManager* manager_; 25 26 DISALLOW_COPY_AND_ASSIGN(FakeVarArrayInterface); 27 }; 28 29 #endif // TESTS_NACL_IO_TEST_FAKE_VAR_ARRAY_INTERFACE_H_ 30