fake_pepper_interface.h revision 5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7
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_PEPPER_INTERFACE_H_ 6#define TESTS_NACL_IO_TEST_FAKE_PEPPER_INTERFACE_H_ 7 8#include "fake_ppapi/fake_core_interface.h" 9#include "fake_ppapi/fake_host_resolver_interface.h" 10#include "fake_ppapi/fake_messaging_interface.h" 11#include "fake_ppapi/fake_net_address_interface.h" 12#include "fake_ppapi/fake_resource_manager.h" 13#include "fake_ppapi/fake_var_array_buffer_interface.h" 14#include "fake_ppapi/fake_var_array_interface.h" 15#include "fake_ppapi/fake_var_interface.h" 16#include "fake_ppapi/fake_var_manager.h" 17#include "nacl_io/pepper_interface_dummy.h" 18 19class FakePepperInterface : public nacl_io::PepperInterfaceDummy { 20 public: 21 FakePepperInterface(); 22 virtual ~FakePepperInterface(); 23 24 virtual nacl_io::CoreInterface* GetCoreInterface(); 25 virtual nacl_io::MessagingInterface* GetMessagingInterface(); 26 virtual nacl_io::VarArrayInterface* GetVarArrayInterface(); 27 virtual nacl_io::VarArrayBufferInterface* GetVarArrayBufferInterface(); 28 virtual nacl_io::VarInterface* GetVarInterface(); 29 virtual nacl_io::HostResolverInterface* GetHostResolverInterface(); 30 virtual nacl_io::NetAddressInterface* GetNetAddressInterface(); 31 virtual PP_Instance GetInstance() { return instance_; } 32 33 FakeResourceManager* resource_manager() { return &resource_manager_; } 34 FakeVarManager* var_manager() { return &var_manager_; } 35 36 private: 37 PP_Instance instance_; 38 FakeVarManager var_manager_; 39 FakeResourceManager resource_manager_; 40 41 FakeCoreInterface core_interface_; 42 FakeMessagingInterface messaging_interface_; 43 FakeVarArrayInterface var_array_interface_; 44 FakeVarArrayBufferInterface var_array_buffer_interface_; 45 FakeVarInterface var_interface_; 46 FakeHostResolverInterface resolver_interface_; 47 FakeNetAddressInterface net_address_interface_; 48 49 DISALLOW_COPY_AND_ASSIGN(FakePepperInterface); 50}; 51 52#endif // TESTS_NACL_IO_TEST_FAKE_PEPPER_INTERFACE_H_ 53