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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.h

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: +DISALLOW_COPY_AND_ASSIGN for win build fix Created 3 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SOURCE_PLATFORM_SCHEDULER_CHILD_WEB_SCHEDULER_IMPL_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_WEB_SCHEDULER_IMPL_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_WEB_SCHEDULER_IMPL_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_WEB_SCHEDULER_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
11 #include "base/time/time.h" 12 #include "base/time/time.h"
12 #include "public/platform/WebCommon.h" 13 #include "public/platform/WebCommon.h"
13 #include "public/platform/WebScheduler.h" 14 #include "public/platform/WebScheduler.h"
14 #include "public/platform/WebThread.h" 15 #include "public/platform/WebThread.h"
15 16
16 namespace blink { 17 namespace blink {
17 namespace scheduler { 18 namespace scheduler {
18 19
19 class ChildScheduler; 20 class ChildScheduler;
(...skipping 28 matching lines...) Expand all
48 void removePendingNavigation( 49 void removePendingNavigation(
49 WebScheduler::NavigatingFrameType type) override {} 50 WebScheduler::NavigatingFrameType type) override {}
50 51
51 private: 52 private:
52 static void runIdleTask(std::unique_ptr<WebThread::IdleTask> task, 53 static void runIdleTask(std::unique_ptr<WebThread::IdleTask> task,
53 base::TimeTicks deadline); 54 base::TimeTicks deadline);
54 55
55 ChildScheduler* child_scheduler_; // NOT OWNED 56 ChildScheduler* child_scheduler_; // NOT OWNED
56 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner_; 57 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner_;
57 scoped_refptr<TaskQueue> timer_task_runner_; 58 scoped_refptr<TaskQueue> timer_task_runner_;
58 std::unique_ptr<WebTaskRunnerImpl> loading_web_task_runner_; 59 RefPtr<WebTaskRunnerImpl> loading_web_task_runner_;
59 std::unique_ptr<WebTaskRunnerImpl> timer_web_task_runner_; 60 RefPtr<WebTaskRunnerImpl> timer_web_task_runner_;
61
62 DISALLOW_COPY_AND_ASSIGN(WebSchedulerImpl);
60 }; 63 };
61 64
62 } // namespace scheduler 65 } // namespace scheduler
63 } // namespace blink 66 } // namespace blink
64 67
65 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_WEB_SCHEDULER_IMPL _H_ 68 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_CHILD_WEB_SCHEDULER_IMPL _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698