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

Side by Side Diff: cc/scheduler/delay_based_time_source.h

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/tile_priority.cc ('k') | cc/scheduler/delay_based_time_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ 5 #ifndef CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
6 #define CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ 6 #define CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "cc/base/cc_export.h" 12 #include "cc/base/cc_export.h"
13 13
14 namespace base { class SingleThreadTaskRunner; } 14 namespace base {
15 namespace debug {
16 class TracedValue;
17 }
18 class SingleThreadTaskRunner;
19 }
15 20
16 namespace cc { 21 namespace cc {
17 22
18 class CC_EXPORT TimeSourceClient { 23 class CC_EXPORT TimeSourceClient {
19 public: 24 public:
20 virtual void OnTimerTick() = 0; 25 virtual void OnTimerTick() = 0;
21 26
22 protected: 27 protected:
23 virtual ~TimeSourceClient() {} 28 virtual ~TimeSourceClient() {}
24 }; 29 };
(...skipping 17 matching lines...) Expand all
42 virtual bool Active() const; 47 virtual bool Active() const;
43 48
44 // Get the last and next tick times. NextTickTime() returns null when 49 // Get the last and next tick times. NextTickTime() returns null when
45 // inactive. 50 // inactive.
46 virtual base::TimeTicks LastTickTime() const; 51 virtual base::TimeTicks LastTickTime() const;
47 virtual base::TimeTicks NextTickTime() const; 52 virtual base::TimeTicks NextTickTime() const;
48 53
49 // Virtual for testing. 54 // Virtual for testing.
50 virtual base::TimeTicks Now() const; 55 virtual base::TimeTicks Now() const;
51 56
52 virtual scoped_ptr<base::Value> AsValue() const; 57 virtual void AsValueInto(base::debug::TracedValue* dict) const;
53 58
54 protected: 59 protected:
55 DelayBasedTimeSource(base::TimeDelta interval, 60 DelayBasedTimeSource(base::TimeDelta interval,
56 base::SingleThreadTaskRunner* task_runner); 61 base::SingleThreadTaskRunner* task_runner);
57 virtual ~DelayBasedTimeSource(); 62 virtual ~DelayBasedTimeSource();
58 63
59 virtual std::string TypeString() const; 64 virtual std::string TypeString() const;
60 65
61 base::TimeTicks NextTickTarget(base::TimeTicks now); 66 base::TimeTicks NextTickTarget(base::TimeTicks now);
62 void PostNextTickTask(base::TimeTicks now); 67 void PostNextTickTask(base::TimeTicks now);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 109
105 virtual std::string TypeString() const OVERRIDE; 110 virtual std::string TypeString() const OVERRIDE;
106 111
107 private: 112 private:
108 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSourceHighRes); 113 DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSourceHighRes);
109 }; 114 };
110 115
111 } // namespace cc 116 } // namespace cc
112 117
113 #endif // CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_ 118 #endif // CC_SCHEDULER_DELAY_BASED_TIME_SOURCE_H_
OLDNEW
« no previous file with comments | « cc/resources/tile_priority.cc ('k') | cc/scheduler/delay_based_time_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698