| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 BASE_MESSAGE_LOOP_PROXY_H_ | 5 #ifndef BASE_MESSAGE_LOOP_PROXY_H_ |
| 6 #define BASE_MESSAGE_LOOP_PROXY_H_ | 6 #define BASE_MESSAGE_LOOP_PROXY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 static scoped_refptr<MessageLoopProxy> CreateForCurrentThread(); | 57 static scoped_refptr<MessageLoopProxy> CreateForCurrentThread(); |
| 58 | 58 |
| 59 protected: | 59 protected: |
| 60 friend struct MessageLoopProxyTraits; | 60 friend struct MessageLoopProxyTraits; |
| 61 | 61 |
| 62 MessageLoopProxy(); | 62 MessageLoopProxy(); |
| 63 virtual ~MessageLoopProxy(); | 63 virtual ~MessageLoopProxy(); |
| 64 | 64 |
| 65 // Called when the proxy is about to be deleted. Subclasses can override this | 65 // Called when the proxy is about to be deleted. Subclasses can override this |
| 66 // to provide deletion on specific threads. | 66 // to provide deletion on specific threads. |
| 67 virtual void OnDestruct(); | 67 virtual void OnDestruct() const; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 struct MessageLoopProxyTraits { | 70 struct MessageLoopProxyTraits { |
| 71 static void Destruct(MessageLoopProxy* proxy) { | 71 static void Destruct(const MessageLoopProxy* proxy) { |
| 72 proxy->OnDestruct(); | 72 proxy->OnDestruct(); |
| 73 } | 73 } |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 } // namespace base | 76 } // namespace base |
| 77 | 77 |
| 78 #endif // BASE_MESSAGE_LOOP_PROXY_H_ | 78 #endif // BASE_MESSAGE_LOOP_PROXY_H_ |
| OLD | NEW |