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.
5 #ifndef TESTS_NACL_IO_TEST_FAKE_CORE_INTERFACE_H_
6 #define TESTS_NACL_IO_TEST_FAKE_CORE_INTERFACE_H_
8 #include "fake_ppapi/fake_resource_manager.h"
9 #include "nacl_io/pepper_interface.h"
10 #include "sdk_util/macros.h"
12 class FakeCoreInterface : public nacl_io::CoreInterface {
14 explicit FakeCoreInterface(FakeResourceManager* manager);
16 virtual void AddRefResource(PP_Resource handle);
17 virtual void ReleaseResource(PP_Resource handle);
18 virtual PP_Bool IsMainThread() { return PP_FALSE; }
20 FakeResourceManager* resource_manager() { return resource_manager_; }
23 FakeResourceManager* resource_manager_; // Weak reference
25 DISALLOW_COPY_AND_ASSIGN(FakeCoreInterface);
28 #endif // TESTS_NACL_IO_TEST_FAKE_CORE_INTERFACE_H_