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

Side by Side Diff: content/browser/gamepad/xbox_data_fetcher_mac.h

Issue 16917011: mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with fixed off-by-1 in git-clang-format Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_BROWSER_GAMEPAD_XBOX_DATA_FETCHER_MAC_H_ 5 #ifndef CONTENT_BROWSER_GAMEPAD_XBOX_DATA_FETCHER_MAC_H_
6 #define CONTENT_BROWSER_GAMEPAD_XBOX_DATA_FETCHER_MAC_H_ 6 #define CONTENT_BROWSER_GAMEPAD_XBOX_DATA_FETCHER_MAC_H_
7 7
8 #include <CoreFoundation/CoreFoundation.h> 8 #include <CoreFoundation/CoreFoundation.h>
9 #include <IOKit/IOKitLib.h> 9 #include <IOKit/IOKitLib.h>
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // the device API that is supported on Mac OS 10.6. 91 // the device API that is supported on Mac OS 10.6.
92 base::mac::ScopedIOPluginInterface<struct IOUSBDeviceStruct320> device_; 92 base::mac::ScopedIOPluginInterface<struct IOUSBDeviceStruct320> device_;
93 93
94 // Handle for the interface on the device which sends button and analog data. 94 // Handle for the interface on the device which sends button and analog data.
95 // The other interfaces (for the ChatPad and headset) are ignored. 95 // The other interfaces (for the ChatPad and headset) are ignored.
96 base::mac::ScopedIOPluginInterface<struct IOUSBInterfaceStruct300> interface_; 96 base::mac::ScopedIOPluginInterface<struct IOUSBInterfaceStruct300> interface_;
97 97
98 bool device_is_open_; 98 bool device_is_open_;
99 bool interface_is_open_; 99 bool interface_is_open_;
100 100
101 base::mac::ScopedCFTypeRef<CFRunLoopSourceRef> source_; 101 base::ScopedCFTypeRef<CFRunLoopSourceRef> source_;
102 102
103 // This will be set to the max packet size reported by the interface, which 103 // This will be set to the max packet size reported by the interface, which
104 // is 32 bytes. I would have expected USB to do message framing itself, but 104 // is 32 bytes. I would have expected USB to do message framing itself, but
105 // somehow we still sometimes (rarely!) get packets off the interface which 105 // somehow we still sometimes (rarely!) get packets off the interface which
106 // aren't correctly framed. The 360 controller frames its packets with a 2 106 // aren't correctly framed. The 360 controller frames its packets with a 2
107 // byte header (type, total length) so we can reframe the packet data 107 // byte header (type, total length) so we can reframe the packet data
108 // ourselves. 108 // ourselves.
109 uint16 read_buffer_size_; 109 uint16 read_buffer_size_;
110 scoped_ptr<uint8[]> read_buffer_; 110 scoped_ptr<uint8[]> read_buffer_;
111 111
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // do need to maintain a reference to it so we can invalidate it. 158 // do need to maintain a reference to it so we can invalidate it.
159 CFRunLoopSourceRef source_; 159 CFRunLoopSourceRef source_;
160 IONotificationPortRef port_; 160 IONotificationPortRef port_;
161 base::mac::ScopedIOObject<io_iterator_t> device_added_iter_; 161 base::mac::ScopedIOObject<io_iterator_t> device_added_iter_;
162 base::mac::ScopedIOObject<io_iterator_t> device_removed_iter_; 162 base::mac::ScopedIOObject<io_iterator_t> device_removed_iter_;
163 163
164 DISALLOW_COPY_AND_ASSIGN(XboxDataFetcher); 164 DISALLOW_COPY_AND_ASSIGN(XboxDataFetcher);
165 }; 165 };
166 166
167 #endif // CONTENT_BROWSER_GAMEPAD_XBOX_DATA_FETCHER_MAC_H_ 167 #endif // CONTENT_BROWSER_GAMEPAD_XBOX_DATA_FETCHER_MAC_H_
OLDNEW
« no previous file with comments | « content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm ('k') | content/browser/gamepad/xbox_data_fetcher_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698