summaryrefslogtreecommitdiff
path: root/chromium/content/common/pepper_file_util.h
blob: b276cfa88a4d372de6d6aeb85981a0f4303d6270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_COMMON_PEPPER_FILE_UTIL_H_
#define CONTENT_COMMON_PEPPER_FILE_UTIL_H_

#include "base/files/file.h"
#include "base/memory/shared_memory.h"
#include "base/sync_socket.h"
#include "ppapi/c/pp_file_info.h"
#include "storage/common/fileapi/file_system_types.h"

#if !defined(ENABLE_PLUGINS)
#error "Plugins should be enabled"
#endif

namespace content {

storage::FileSystemType PepperFileSystemTypeToFileSystemType(
    PP_FileSystemType type);

base::PlatformFile PlatformFileFromSharedMemoryHandle(
    const base::SharedMemoryHandle& shm_handle);

int IntegerFromSyncSocketHandle(
    const base::SyncSocket::Handle& socket_handle);

}  // namespace content

#endif  // CONTENT_COMMON_PEPPER_FILE_UTIL_H_