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_INTERFACE_H_ 6#define TESTS_NACL_IO_TEST_FAKE_VAR_INTERFACE_H_ 7 8#include "nacl_io/pepper_interface.h" 9#include "sdk_util/macros.h" 10 11class FakeVarManager; 12 13class FakeVarInterface : public nacl_io::VarInterface { 14 public: 15 explicit FakeVarInterface(FakeVarManager* manager); 16 17 virtual void AddRef(PP_Var var); 18 virtual void Release(PP_Var var); 19 virtual PP_Var VarFromUtf8(const char* data, uint32_t len); 20 virtual const char* VarToUtf8(PP_Var var, uint32_t* out_len); 21 22 private: 23 FakeVarManager* manager_; 24 25 DISALLOW_COPY_AND_ASSIGN(FakeVarInterface); 26}; 27 28#endif // TESTS_NACL_IO_TEST_FAKE_VAR_INTERFACE_H_ 29