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

Side by Side Diff: base/mac/scoped_ionotificationportref.h

Issue 2332903002: [sensors] [mac] Implement ambient light sensor for macOS (Closed)
Patch Set: Address Robert comment Created 4 years, 2 months 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
OLDNEW
(Empty)
1 // Copyright 2016 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 BASE_MAC_SCOPED_IONOTIFICATIONPORTREF_H
Robert Sesek 2016/10/06 18:58:53 nit: needs trailing _
6 #define BASE_MAC_SCOPED_IONOTIFICATIONPORTREF_H
7
8 #include <IOKit/IOKitLib.h>
9
10 #include "base/scoped_generic.h"
11
12 namespace base {
13 namespace mac {
14
15 namespace internal {
16
17 struct ScopedIONotificationPortRefTraits {
18 static IONotificationPortRef InvalidValue() { return nullptr; }
19 static void Free(IONotificationPortRef object) {
20 IONotificationPortDestroy(object);
21 }
22 };
23
24 } // namepsace internal
25
26 using ScopedIONotificationPortRef =
27 ScopedGeneric<IONotificationPortRef,
28 internal::ScopedIONotificationPortRefTraits>;
29
30 } // namespace mac
31 } // namespace base
32
33 #endif // BASE_MAC_SCOPED_IONOTIFICATIONPORTREF_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698