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

Side by Side Diff: base/message_loop_proxy.h

Issue 7461141: Rename BASE_API to BASE_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | « base/message_loop.h ('k') | base/message_loop_proxy_impl.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/base_api.h" 9 #include "base/base_export.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/task.h" 13 #include "base/task.h"
14 14
15 namespace base { 15 namespace base {
16 16
17 struct MessageLoopProxyTraits; 17 struct MessageLoopProxyTraits;
18 18
19 // This class provides a thread-safe refcounted interface to the Post* methods 19 // This class provides a thread-safe refcounted interface to the Post* methods
20 // of a message loop. This class can outlive the target message loop. You can 20 // of a message loop. This class can outlive the target message loop. You can
21 // obtain a MessageLoopProxy via Thread::message_loop_proxy() or 21 // obtain a MessageLoopProxy via Thread::message_loop_proxy() or
22 // MessageLoopProxy::CreateForCurrentThread(). 22 // MessageLoopProxy::CreateForCurrentThread().
23 class BASE_API MessageLoopProxy 23 class BASE_EXPORT MessageLoopProxy
24 : public base::RefCountedThreadSafe<MessageLoopProxy, 24 : public base::RefCountedThreadSafe<MessageLoopProxy,
25 MessageLoopProxyTraits> { 25 MessageLoopProxyTraits> {
26 public: 26 public:
27 // These methods are the same as in message_loop.h, but are guaranteed to 27 // These methods are the same as in message_loop.h, but are guaranteed to
28 // either post the Task to the MessageLoop (if it's still alive), or to 28 // either post the Task to the MessageLoop (if it's still alive), or to
29 // delete the Task otherwise. 29 // delete the Task otherwise.
30 // They return true iff the thread existed and the task was posted. Note that 30 // They return true iff the thread existed and the task was posted. Note that
31 // even if the task is posted, there's no guarantee that it will run; for 31 // even if the task is posted, there's no guarantee that it will run; for
32 // example the target loop may already be quitting, or in the case of a 32 // example the target loop may already be quitting, or in the case of a
33 // delayed task a Quit message may preempt it in the message loop queue. 33 // delayed task a Quit message may preempt it in the message loop queue.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 struct MessageLoopProxyTraits { 97 struct MessageLoopProxyTraits {
98 static void Destruct(const MessageLoopProxy* proxy) { 98 static void Destruct(const MessageLoopProxy* proxy) {
99 proxy->OnDestruct(); 99 proxy->OnDestruct();
100 } 100 }
101 }; 101 };
102 102
103 } // namespace base 103 } // namespace base
104 104
105 #endif // BASE_MESSAGE_LOOP_PROXY_H_ 105 #endif // BASE_MESSAGE_LOOP_PROXY_H_
OLDNEW
« no previous file with comments | « base/message_loop.h ('k') | base/message_loop_proxy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698