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.
5 #include "ppapi/cpp/private/pass_file_handle.h"
15 PassFileHandle::PassFileHandle()
16 : handle_(PP_kInvalidFileHandle
) {
19 PassFileHandle::PassFileHandle(PP_FileHandle handle
)
23 PassFileHandle::PassFileHandle(PassFileHandle
& handle
)
24 : handle_(handle
.Release()) {
27 PassFileHandle::~PassFileHandle() {
31 PP_FileHandle
PassFileHandle::Release() {
32 PP_FileHandle released
= handle_
;
33 handle_
= PP_kInvalidFileHandle
;
37 void PassFileHandle::Close() {
38 if (handle_
!= PP_kInvalidFileHandle
) {
44 handle_
= PP_kInvalidFileHandle
;