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

Side by Side Diff: base/message_loop/message_loop_proxy_impl.h

Issue 668783004: Standardize usage of virtual/override/final in base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted Created 6 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/message_loop/message_loop_proxy.h ('k') | base/message_loop/message_loop_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MESSAGE_LOOP_PROXY_IMPL_H_ 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_PROXY_IMPL_H_
6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_PROXY_IMPL_H_ 6 #define BASE_MESSAGE_LOOP_MESSAGE_LOOP_PROXY_IMPL_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
11 #include "base/pending_task.h" 11 #include "base/pending_task.h"
12 #include "base/threading/platform_thread.h" 12 #include "base/threading/platform_thread.h"
13 13
14 namespace base { 14 namespace base {
15 namespace internal { 15 namespace internal {
16 16
17 class IncomingTaskQueue; 17 class IncomingTaskQueue;
18 18
19 // A stock implementation of MessageLoopProxy that is created and managed by a 19 // A stock implementation of MessageLoopProxy that is created and managed by a
20 // MessageLoop. For now a MessageLoopProxyImpl can only be created as part of a 20 // MessageLoop. For now a MessageLoopProxyImpl can only be created as part of a
21 // MessageLoop. 21 // MessageLoop.
22 class BASE_EXPORT MessageLoopProxyImpl : public MessageLoopProxy { 22 class BASE_EXPORT MessageLoopProxyImpl : public MessageLoopProxy {
23 public: 23 public:
24 explicit MessageLoopProxyImpl( 24 explicit MessageLoopProxyImpl(
25 scoped_refptr<IncomingTaskQueue> incoming_queue); 25 scoped_refptr<IncomingTaskQueue> incoming_queue);
26 26
27 // MessageLoopProxy implementation 27 // MessageLoopProxy implementation
28 virtual bool PostDelayedTask(const tracked_objects::Location& from_here, 28 bool PostDelayedTask(const tracked_objects::Location& from_here,
29 const base::Closure& task, 29 const base::Closure& task,
30 base::TimeDelta delay) override; 30 base::TimeDelta delay) override;
31 virtual bool PostNonNestableDelayedTask( 31 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
32 const tracked_objects::Location& from_here, 32 const base::Closure& task,
33 const base::Closure& task, 33 base::TimeDelta delay) override;
34 base::TimeDelta delay) override; 34 bool RunsTasksOnCurrentThread() const override;
35 virtual bool RunsTasksOnCurrentThread() const override;
36 35
37 private: 36 private:
38 friend class RefCountedThreadSafe<MessageLoopProxyImpl>; 37 friend class RefCountedThreadSafe<MessageLoopProxyImpl>;
39 virtual ~MessageLoopProxyImpl(); 38 ~MessageLoopProxyImpl() override;
40 39
41 // THe incoming queue receiving all posted tasks. 40 // THe incoming queue receiving all posted tasks.
42 scoped_refptr<IncomingTaskQueue> incoming_queue_; 41 scoped_refptr<IncomingTaskQueue> incoming_queue_;
43 42
44 // ID of the thread |this| was created on. 43 // ID of the thread |this| was created on.
45 PlatformThreadId valid_thread_id_; 44 PlatformThreadId valid_thread_id_;
46 45
47 DISALLOW_COPY_AND_ASSIGN(MessageLoopProxyImpl); 46 DISALLOW_COPY_AND_ASSIGN(MessageLoopProxyImpl);
48 }; 47 };
49 48
50 } // namespace internal 49 } // namespace internal
51 } // namespace base 50 } // namespace base
52 51
53 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_PROXY_IMPL_H_ 52 #endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_PROXY_IMPL_H_
OLDNEW
« no previous file with comments | « base/message_loop/message_loop_proxy.h ('k') | base/message_loop/message_loop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698