Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: mojo/edk/platform/scoped_platform_handle.h

Issue 1505983002: EDK: Remove platform_handle_utils*. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/edk/platform/platform_handle.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_EDK_PLATFORM_SCOPED_PLATFORM_HANDLE_H_ 5 #ifndef MOJO_EDK_PLATFORM_SCOPED_PLATFORM_HANDLE_H_
6 #define MOJO_EDK_PLATFORM_SCOPED_PLATFORM_HANDLE_H_ 6 #define MOJO_EDK_PLATFORM_SCOPED_PLATFORM_HANDLE_H_
7 7
8 #include "mojo/edk/platform/platform_handle.h" 8 #include "mojo/edk/platform/platform_handle.h"
9 #include "mojo/public/c/system/macros.h" 9 #include "mojo/public/c/system/macros.h"
10 #include "mojo/public/cpp/system/macros.h" 10 #include "mojo/public/cpp/system/macros.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 return rv; 43 return rv;
44 } 44 }
45 45
46 void reset(PlatformHandle handle = PlatformHandle()) { 46 void reset(PlatformHandle handle = PlatformHandle()) {
47 handle_.CloseIfNecessary(); 47 handle_.CloseIfNecessary();
48 handle_ = handle; 48 handle_ = handle;
49 } 49 }
50 50
51 bool is_valid() const { return handle_.is_valid(); } 51 bool is_valid() const { return handle_.is_valid(); }
52 52
53 // Forwards to |PlatformHandle::Duplicate()|.
54 ScopedPlatformHandle Duplicate() const { return handle_.Duplicate(); }
55
53 private: 56 private:
54 PlatformHandle handle_; 57 PlatformHandle handle_;
55 58
56 MOJO_MOVE_ONLY_TYPE(ScopedPlatformHandle); 59 MOJO_MOVE_ONLY_TYPE(ScopedPlatformHandle);
57 }; 60 };
58 61
59 } // namespace platform 62 } // namespace platform
60 } // namespace mojo 63 } // namespace mojo
61 64
62 #endif // MOJO_EDK_PLATFORM_SCOPED_PLATFORM_HANDLE_H_ 65 #endif // MOJO_EDK_PLATFORM_SCOPED_PLATFORM_HANDLE_H_
OLDNEW
« no previous file with comments | « mojo/edk/platform/platform_handle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698