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

Side by Side Diff: chrome/common/mach_message_source_mac.h

Issue 3855001: Move scoped_cftyperef from base to base/mac, use the new namespace, and name ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/font_loader_mac.mm ('k') | chrome/common/mach_message_source_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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 CHROME_COMMON_MACH_MESSAGE_SOURCE_MAC_H_ 5 #ifndef CHROME_COMMON_MACH_MESSAGE_SOURCE_MAC_H_
6 #define CHROME_COMMON_MACH_MESSAGE_SOURCE_MAC_H_ 6 #define CHROME_COMMON_MACH_MESSAGE_SOURCE_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #include <CoreServices/CoreServices.h> 9 #include <CoreServices/CoreServices.h>
10 10
11 #include "base/scoped_cftyperef.h" 11 #include "base/mac/scoped_cftyperef.h"
12 12
13 // Handles registering and cleaning up after a CFRunloopSource for a Mach port. 13 // Handles registering and cleaning up after a CFRunloopSource for a Mach port.
14 // Messages received on the port are piped through to a delegate. 14 // Messages received on the port are piped through to a delegate.
15 // 15 //
16 // Example: 16 // Example:
17 // class MyListener : public MachMessageSource::MachPortListener { 17 // class MyListener : public MachMessageSource::MachPortListener {
18 // public: 18 // public:
19 // void OnMachMessageReceived(void* mach_msg, size_t size) { 19 // void OnMachMessageReceived(void* mach_msg, size_t size) {
20 // printf("received message on Mach port\n"); 20 // printf("received message on Mach port\n");
21 // } 21 // }
(...skipping 27 matching lines...) Expand all
49 MachMessageSource(mach_port_t port, 49 MachMessageSource(mach_port_t port,
50 MachPortListener* listener, 50 MachPortListener* listener,
51 bool* success); 51 bool* success);
52 ~MachMessageSource(); 52 ~MachMessageSource();
53 53
54 private: 54 private:
55 // Called by CF when a new message arrives on the Mach port. 55 // Called by CF when a new message arrives on the Mach port.
56 static void OnReceiveMachMessage(CFMachPortRef port, void* msg, CFIndex size, 56 static void OnReceiveMachMessage(CFMachPortRef port, void* msg, CFIndex size,
57 void* closure); 57 void* closure);
58 58
59 scoped_cftyperef<CFRunLoopSourceRef> machport_runloop_ref_; 59 base::mac::ScopedCFTypeRef<CFRunLoopSourceRef> machport_runloop_ref_;
60 DISALLOW_COPY_AND_ASSIGN(MachMessageSource); 60 DISALLOW_COPY_AND_ASSIGN(MachMessageSource);
61 }; 61 };
62 62
63 #endif // CHROME_COMMON_MACH_MESSAGE_SOURCE_MAC_H_ 63 #endif // CHROME_COMMON_MACH_MESSAGE_SOURCE_MAC_H_
OLDNEW
« no previous file with comments | « chrome/common/font_loader_mac.mm ('k') | chrome/common/mach_message_source_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698