- add sources.
[platform/framework/web/crosswalk.git] / src / native_client_sdk / src / tests / nacl_io_test / fake_core_interface.h
1 // Copyright (c) 2013 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 LIBRARIES_NACL_IO_TEST_FAKE_CORE_INTERFACE_H_
6 #define LIBRARIES_NACL_IO_TEST_FAKE_CORE_INTERFACE_H_
7
8 #include "fake_resource_manager.h"
9 #include "nacl_io/pepper_interface.h"
10 #include "sdk_util/macros.h"
11
12 class FakeCoreInterface : public nacl_io::CoreInterface {
13  public:
14   FakeCoreInterface();
15
16   virtual void AddRefResource(PP_Resource handle);
17   virtual void ReleaseResource(PP_Resource handle);
18   virtual PP_Bool IsMainThread() { return PP_FALSE; }
19
20   FakeResourceManager* resource_manager() { return &resource_manager_; }
21
22  private:
23   FakeResourceManager resource_manager_;
24
25   DISALLOW_COPY_AND_ASSIGN(FakeCoreInterface);
26 };
27
28 #endif  // LIBRARIES_NACL_IO_TEST_FAKE_CORE_INTERFACE_H_