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

Side by Side Diff: third_party/WebKit/public/platform/scheduler/child/webthread_base.h

Issue 2276353002: Remove after wakeup logic and replace PumpTask with Fences (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make TestLongIdlePeriodTimeline test quiescence again! Created 4 years, 3 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 THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_WEBTHREAD_BASE_H_ 5 #ifndef THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_WEBTHREAD_BASE_H_
6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_WEBTHREAD_BASE_H_ 6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_WEBTHREAD_BASE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
11 #include "base/threading/thread.h" 11 #include "base/threading/thread.h"
12 #include "public/platform/WebCommon.h" 12 #include "public/platform/WebCommon.h"
13 #include "public/platform/WebThread.h" 13 #include "public/platform/WebThread.h"
14 #include "public/platform/WebTraceLocation.h" 14 #include "public/platform/WebTraceLocation.h"
15 15
16 namespace blink { 16 namespace blink {
17 namespace scheduler { 17 namespace scheduler {
18 class SingleThreadIdleTaskRunner; 18 class SingleThreadIdleTaskRunner;
19 19
20 class BLINK_PLATFORM_EXPORT WebThreadBase : public WebThread { 20 class BLINK_PLATFORM_EXPORT WebThreadBase : public WebThread {
21 public: 21 public:
22 ~WebThreadBase() override; 22 ~WebThreadBase() override;
23 23
24 // WebThread implementation. 24 // WebThread implementation.
25 bool isCurrentThread() const override; 25 bool isCurrentThread() const override;
26 PlatformThreadId threadId() const override = 0; 26 PlatformThreadId threadId() const override = 0;
27 27
28 virtual void postIdleTask(const WebTraceLocation& location, 28 virtual void postIdleTask(const WebTraceLocation& location,
29 IdleTask* idle_task); 29 IdleTask* idle_task);
30 virtual void postIdleTaskAfterWakeup(const WebTraceLocation& location,
31 IdleTask* idle_task);
32 30
33 void addTaskObserver(TaskObserver* observer) override; 31 void addTaskObserver(TaskObserver* observer) override;
34 void removeTaskObserver(TaskObserver* observer) override; 32 void removeTaskObserver(TaskObserver* observer) override;
35 33
36 // Returns the base::Bind-compatible task runner for posting tasks to this 34 // Returns the base::Bind-compatible task runner for posting tasks to this
37 // thread. Can be called from any thread. 35 // thread. Can be called from any thread.
38 virtual base::SingleThreadTaskRunner* GetTaskRunner() const = 0; 36 virtual base::SingleThreadTaskRunner* GetTaskRunner() const = 0;
39 37
40 // Returns the base::Bind-compatible task runner for posting idle tasks to 38 // Returns the base::Bind-compatible task runner for posting idle tasks to
41 // this thread. Can be called from any thread. 39 // this thread. Can be called from any thread.
(...skipping 15 matching lines...) Expand all
57 55
58 private: 56 private:
59 typedef std::map<TaskObserver*, TaskObserverAdapter*> TaskObserverMap; 57 typedef std::map<TaskObserver*, TaskObserverAdapter*> TaskObserverMap;
60 TaskObserverMap task_observer_map_; 58 TaskObserverMap task_observer_map_;
61 }; 59 };
62 60
63 } // namespace scheduler 61 } // namespace scheduler
64 } // namespace blink 62 } // namespace blink
65 63
66 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_WEBTHREAD_BASE_H_ 64 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_CHILD_WEBTHREAD_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698