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

Side by Side Diff: base/message_loop_proxy.h

Issue 3452030: FBTF: Moves code to the headers. (Closed) Base URL: http://src.chromium.org/git/chromium.git
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
« no previous file with comments | « base/histogram.cc ('k') | base/message_loop_proxy.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) 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return PostNonNestableTask(from_here, new ReleaseTask<T>(object)); 50 return PostNonNestableTask(from_here, new ReleaseTask<T>(object));
51 } 51 }
52 52
53 // Factory method for creating an implementation of MessageLoopProxy 53 // Factory method for creating an implementation of MessageLoopProxy
54 // for the current thread. 54 // for the current thread.
55 static scoped_refptr<MessageLoopProxy> CreateForCurrentThread(); 55 static scoped_refptr<MessageLoopProxy> CreateForCurrentThread();
56 56
57 protected: 57 protected:
58 friend struct MessageLoopProxyTraits; 58 friend struct MessageLoopProxyTraits;
59 59
60 virtual ~MessageLoopProxy() { } 60 MessageLoopProxy();
61 virtual ~MessageLoopProxy();
61 62
62 // Called when the proxy is about to be deleted. Subclasses can override this 63 // Called when the proxy is about to be deleted. Subclasses can override this
63 // to provide deletion on specific threads. 64 // to provide deletion on specific threads.
64 virtual void OnDestruct() { 65 virtual void OnDestruct();
65 delete this;
66 }
67 }; 66 };
68 67
69 struct MessageLoopProxyTraits { 68 struct MessageLoopProxyTraits {
70 static void Destruct(MessageLoopProxy* proxy) { 69 static void Destruct(MessageLoopProxy* proxy) {
71 proxy->OnDestruct(); 70 proxy->OnDestruct();
72 } 71 }
73 }; 72 };
74 73
75 } // namespace base 74 } // namespace base
76 75
77 #endif // BASE_MESSAGE_LOOP_PROXY_H_ 76 #endif // BASE_MESSAGE_LOOP_PROXY_H_
78 77
OLDNEW
« no previous file with comments | « base/histogram.cc ('k') | base/message_loop_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698