Home | History | Annotate | Download | only in fake_ppapi
      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_dictionary_interface.h"
     16 #include "fake_ppapi/fake_var_interface.h"
     17 #include "fake_ppapi/fake_var_manager.h"
     18 #include "nacl_io/pepper_interface_dummy.h"
     19 
     20 class FakePepperInterface : public nacl_io::PepperInterfaceDummy {
     21  public:
     22   FakePepperInterface();
     23   virtual ~FakePepperInterface();
     24 
     25   virtual nacl_io::CoreInterface* GetCoreInterface();
     26   virtual nacl_io::MessagingInterface* GetMessagingInterface();
     27   virtual nacl_io::VarArrayInterface* GetVarArrayInterface();
     28   virtual nacl_io::VarArrayBufferInterface* GetVarArrayBufferInterface();
     29   virtual nacl_io::VarDictionaryInterface* GetVarDictionaryInterface();
     30   virtual nacl_io::VarInterface* GetVarInterface();
     31   virtual nacl_io::HostResolverInterface* GetHostResolverInterface();
     32   virtual nacl_io::NetAddressInterface* GetNetAddressInterface();
     33   virtual PP_Instance GetInstance() { return instance_; }
     34 
     35   FakeResourceManager* resource_manager() { return &resource_manager_; }
     36   FakeVarManager* var_manager() { return &var_manager_; }
     37 
     38  private:
     39   PP_Instance instance_;
     40   FakeVarManager var_manager_;
     41   FakeResourceManager resource_manager_;
     42 
     43   FakeCoreInterface core_interface_;
     44   FakeMessagingInterface messaging_interface_;
     45   FakeVarArrayInterface var_array_interface_;
     46   FakeVarArrayBufferInterface var_array_buffer_interface_;
     47   FakeVarInterface var_interface_;
     48   FakeVarDictionaryInterface var_dictionary_interface_;
     49   FakeHostResolverInterface resolver_interface_;
     50   FakeNetAddressInterface net_address_interface_;
     51 
     52   DISALLOW_COPY_AND_ASSIGN(FakePepperInterface);
     53 };
     54 
     55 #endif  // TESTS_NACL_IO_TEST_FAKE_PEPPER_INTERFACE_H_
     56