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

Side by Side Diff: third_party/WebKit/Source/platform/WebThreadSupportingGC.h

Issue 1916703002: Prepare for move-only PassOwnPtr in the remaining directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@core1
Patch Set: Merge with trunk. Created 4 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 WebThreadSupportingGC_h 5 #ifndef WebThreadSupportingGC_h
6 #define WebThreadSupportingGC_h 6 #define WebThreadSupportingGC_h
7 7
8 #include "platform/heap/GCTaskRunner.h" 8 #include "platform/heap/GCTaskRunner.h"
9 #include "public/platform/Platform.h" 9 #include "public/platform/Platform.h"
10 #include "public/platform/WebTaskRunner.h" 10 #include "public/platform/WebTaskRunner.h"
(...skipping 17 matching lines...) Expand all
28 class PLATFORM_EXPORT WebThreadSupportingGC final { 28 class PLATFORM_EXPORT WebThreadSupportingGC final {
29 USING_FAST_MALLOC(WebThreadSupportingGC); 29 USING_FAST_MALLOC(WebThreadSupportingGC);
30 WTF_MAKE_NONCOPYABLE(WebThreadSupportingGC); 30 WTF_MAKE_NONCOPYABLE(WebThreadSupportingGC);
31 public: 31 public:
32 static PassOwnPtr<WebThreadSupportingGC> create(const char* name); 32 static PassOwnPtr<WebThreadSupportingGC> create(const char* name);
33 static PassOwnPtr<WebThreadSupportingGC> createForThread(WebThread*); 33 static PassOwnPtr<WebThreadSupportingGC> createForThread(WebThread*);
34 ~WebThreadSupportingGC(); 34 ~WebThreadSupportingGC();
35 35
36 void postTask(const WebTraceLocation& location, PassOwnPtr<SameThreadClosure > task) 36 void postTask(const WebTraceLocation& location, PassOwnPtr<SameThreadClosure > task)
37 { 37 {
38 m_thread->getWebTaskRunner()->postTask(location, task); 38 m_thread->getWebTaskRunner()->postTask(location, std::move(task));
39 } 39 }
40 40
41 void postDelayedTask(const WebTraceLocation& location, PassOwnPtr<SameThread Closure> task, long long delayMs) 41 void postDelayedTask(const WebTraceLocation& location, PassOwnPtr<SameThread Closure> task, long long delayMs)
42 { 42 {
43 m_thread->getWebTaskRunner()->postDelayedTask(location, task, delayMs); 43 m_thread->getWebTaskRunner()->postDelayedTask(location, std::move(task), delayMs);
44 } 44 }
45 45
46 void postTask(const WebTraceLocation& location, PassOwnPtr<CrossThreadClosur e> task) 46 void postTask(const WebTraceLocation& location, PassOwnPtr<CrossThreadClosur e> task)
47 { 47 {
48 m_thread->getWebTaskRunner()->postTask(location, task); 48 m_thread->getWebTaskRunner()->postTask(location, std::move(task));
49 } 49 }
50 50
51 void postDelayedTask(const WebTraceLocation& location, PassOwnPtr<CrossThrea dClosure> task, long long delayMs) 51 void postDelayedTask(const WebTraceLocation& location, PassOwnPtr<CrossThrea dClosure> task, long long delayMs)
52 { 52 {
53 m_thread->getWebTaskRunner()->postDelayedTask(location, task, delayMs); 53 m_thread->getWebTaskRunner()->postDelayedTask(location, std::move(task), delayMs);
54 } 54 }
55 55
56 bool isCurrentThread() const 56 bool isCurrentThread() const
57 { 57 {
58 return m_thread->isCurrentThread(); 58 return m_thread->isCurrentThread();
59 } 59 }
60 60
61 void addTaskObserver(WebThread::TaskObserver* observer) 61 void addTaskObserver(WebThread::TaskObserver* observer)
62 { 62 {
63 m_thread->addTaskObserver(observer); 63 m_thread->addTaskObserver(observer);
(...skipping 21 matching lines...) Expand all
85 // m_thread is guaranteed to be non-null after this instance is constructed. 85 // m_thread is guaranteed to be non-null after this instance is constructed.
86 // m_owningThread is non-null unless this instance is constructed for an 86 // m_owningThread is non-null unless this instance is constructed for an
87 // existing thread via createForThread(). 87 // existing thread via createForThread().
88 WebThread* m_thread = nullptr; 88 WebThread* m_thread = nullptr;
89 OwnPtr<WebThread> m_owningThread; 89 OwnPtr<WebThread> m_owningThread;
90 }; 90 };
91 91
92 } // namespace blink 92 } // namespace blink
93 93
94 #endif 94 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/TraceEvent.h ('k') | third_party/WebKit/Source/platform/audio/AudioBus.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698