• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_DICTIONARY_INTERFACE_H_
6 #define TESTS_NACL_IO_TEST_FAKE_VAR_DICTIONARY_INTERFACE_H_
7 
8 #include "nacl_io/pepper_interface.h"
9 #include "sdk_util/macros.h"
10 
11 class FakeVarManager;
12 
13 class FakeVarDictionaryInterface : public nacl_io::VarDictionaryInterface {
14  public:
15   explicit FakeVarDictionaryInterface(FakeVarManager* manager,
16       nacl_io::VarInterface* var_interface,
17       nacl_io::VarArrayInterface* array_interface);
18 
19   virtual PP_Var Create();
20   virtual PP_Var Get(PP_Var dict, PP_Var key);
21   virtual PP_Bool Set(PP_Var dict, PP_Var key, PP_Var value);
22   virtual void  Delete(PP_Var dict, PP_Var key);
23   virtual PP_Bool HasKey(PP_Var dict, PP_Var key);
24   virtual PP_Var GetKeys(PP_Var dict);
25 
26  private:
27   FakeVarManager* manager_;
28   nacl_io::VarInterface* var_interface_;
29   nacl_io::VarArrayInterface* array_interface_;
30 
31   DISALLOW_COPY_AND_ASSIGN(FakeVarDictionaryInterface);
32 };
33 
34 #endif  // TESTS_NACL_IO_TEST_FAKE_VAR_DICTIONARY_INTERFACE_H_
35