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

Side by Side Diff: components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tests.h

Issue 1411843008: Make blink platform time consistent with the timer virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CachingCorrectnessTest Created 5 years, 1 month 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 COMPONENTS_SCHEDULER_TEST_LAZY_SCHEDULER_MESSAGE_LOOP_DELEGATE_FOR_TESTS _H_ 5 #ifndef COMPONENTS_SCHEDULER_TEST_LAZY_SCHEDULER_MESSAGE_LOOP_DELEGATE_FOR_TESTS _H_
6 #define COMPONENTS_SCHEDULER_TEST_LAZY_SCHEDULER_MESSAGE_LOOP_DELEGATE_FOR_TESTS _H_ 6 #define COMPONENTS_SCHEDULER_TEST_LAZY_SCHEDULER_MESSAGE_LOOP_DELEGATE_FOR_TESTS _H_
7 7
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/time/tick_clock.h" 9 #include "base/time/tick_clock.h"
10 #include "components/scheduler/child/scheduler_tqm_delegate.h" 10 #include "components/scheduler/child/scheduler_tqm_delegate.h"
(...skipping 18 matching lines...) Expand all
29 bool PostDelayedTask(const tracked_objects::Location& from_here, 29 bool PostDelayedTask(const tracked_objects::Location& from_here,
30 const base::Closure& task, 30 const base::Closure& task,
31 base::TimeDelta delay) override; 31 base::TimeDelta delay) override;
32 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, 32 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
33 const base::Closure& task, 33 const base::Closure& task,
34 base::TimeDelta delay) override; 34 base::TimeDelta delay) override;
35 bool RunsTasksOnCurrentThread() const override; 35 bool RunsTasksOnCurrentThread() const override;
36 bool IsNested() const override; 36 bool IsNested() const override;
37 base::TimeTicks NowTicks() override; 37 base::TimeTicks NowTicks() override;
38 void OnNoMoreImmediateWork() override; 38 void OnNoMoreImmediateWork() override;
39 double CurrentTimeSeconds() const override;
39 40
40 private: 41 private:
41 LazySchedulerMessageLoopDelegateForTests(); 42 LazySchedulerMessageLoopDelegateForTests();
42 ~LazySchedulerMessageLoopDelegateForTests() override; 43 ~LazySchedulerMessageLoopDelegateForTests() override;
43 44
44 bool HasMessageLoop() const; 45 bool HasMessageLoop() const;
45 base::MessageLoop* EnsureMessageLoop() const; 46 base::MessageLoop* EnsureMessageLoop() const;
46 47
47 mutable base::MessageLoop* message_loop_; 48 mutable base::MessageLoop* message_loop_;
48 base::PlatformThreadId thread_id_; 49 base::PlatformThreadId thread_id_;
49 50
50 // A task runner which hasn't yet been overridden in the message loop. 51 // A task runner which hasn't yet been overridden in the message loop.
51 mutable scoped_refptr<base::SingleThreadTaskRunner> pending_task_runner_; 52 mutable scoped_refptr<base::SingleThreadTaskRunner> pending_task_runner_;
52 mutable scoped_refptr<base::SingleThreadTaskRunner> original_task_runner_; 53 mutable scoped_refptr<base::SingleThreadTaskRunner> original_task_runner_;
53 scoped_ptr<base::TickClock> time_source_; 54 scoped_ptr<base::TickClock> time_source_;
54 55
55 DISALLOW_COPY_AND_ASSIGN(LazySchedulerMessageLoopDelegateForTests); 56 DISALLOW_COPY_AND_ASSIGN(LazySchedulerMessageLoopDelegateForTests);
56 }; 57 };
57 58
58 } // namespace scheduler 59 } // namespace scheduler
59 60
60 #endif // COMPONENTS_SCHEDULER_TEST_LAZY_SCHEDULER_MESSAGE_LOOP_DELEGATE_FOR_TE STS_H_ 61 #endif // COMPONENTS_SCHEDULER_TEST_LAZY_SCHEDULER_MESSAGE_LOOP_DELEGATE_FOR_TE STS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698