| OLD | NEW |
| 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_TEST_LAZY_SCHEDULER_MESSAGE
_LOOP_DELEGATE_FOR_TESTS_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_TEST_LAZY_SCHEDULER_MESSAGE
_LOOP_DELEGATE_FOR_TESTS_H_ |
| 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_TEST_LAZY_SCHEDULER_MESSAGE
_LOOP_DELEGATE_FOR_TESTS_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_TEST_LAZY_SCHEDULER_MESSAGE
_LOOP_DELEGATE_FOR_TESTS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // (crbug.com/495659). | 24 // (crbug.com/495659). |
| 25 class LazySchedulerMessageLoopDelegateForTests : public SchedulerTqmDelegate { | 25 class LazySchedulerMessageLoopDelegateForTests : public SchedulerTqmDelegate { |
| 26 public: | 26 public: |
| 27 static scoped_refptr<LazySchedulerMessageLoopDelegateForTests> Create(); | 27 static scoped_refptr<LazySchedulerMessageLoopDelegateForTests> Create(); |
| 28 | 28 |
| 29 // SchedulerTqmDelegate implementation | 29 // SchedulerTqmDelegate implementation |
| 30 void SetDefaultTaskRunner( | 30 void SetDefaultTaskRunner( |
| 31 scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; | 31 scoped_refptr<base::SingleThreadTaskRunner> task_runner) override; |
| 32 void RestoreDefaultTaskRunner() override; | 32 void RestoreDefaultTaskRunner() override; |
| 33 bool PostDelayedTask(const tracked_objects::Location& from_here, | 33 bool PostDelayedTask(const tracked_objects::Location& from_here, |
| 34 const base::Closure& task, | 34 base::OnceClosure task, |
| 35 base::TimeDelta delay) override; | 35 base::TimeDelta delay) override; |
| 36 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, | 36 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
| 37 const base::Closure& task, | 37 base::OnceClosure task, |
| 38 base::TimeDelta delay) override; | 38 base::TimeDelta delay) override; |
| 39 bool RunsTasksOnCurrentThread() const override; | 39 bool RunsTasksOnCurrentThread() const override; |
| 40 bool IsNested() const override; | 40 bool IsNested() const override; |
| 41 void AddNestingObserver( | 41 void AddNestingObserver( |
| 42 base::MessageLoop::NestingObserver* observer) override; | 42 base::MessageLoop::NestingObserver* observer) override; |
| 43 void RemoveNestingObserver( | 43 void RemoveNestingObserver( |
| 44 base::MessageLoop::NestingObserver* observer) override; | 44 base::MessageLoop::NestingObserver* observer) override; |
| 45 base::TimeTicks NowTicks() override; | 45 base::TimeTicks NowTicks() override; |
| 46 | 46 |
| 47 private: | 47 private: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 61 | 61 |
| 62 base::MessageLoop::NestingObserver* pending_observer_; | 62 base::MessageLoop::NestingObserver* pending_observer_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(LazySchedulerMessageLoopDelegateForTests); | 64 DISALLOW_COPY_AND_ASSIGN(LazySchedulerMessageLoopDelegateForTests); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } // namespace scheduler | 67 } // namespace scheduler |
| 68 } // namespace blink | 68 } // namespace blink |
| 69 | 69 |
| 70 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_TEST_LAZY_SCHEDULER_MESS
AGE_LOOP_DELEGATE_FOR_TESTS_H_ | 70 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_TEST_LAZY_SCHEDULER_MESS
AGE_LOOP_DELEGATE_FOR_TESTS_H_ |
| OLD | NEW |