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

Unified Diff: cc/frame_rate_controller.h

Issue 11344004: Remove WebKit::Platform dependencies from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: cc/frame_rate_controller.h
diff --git a/cc/frame_rate_controller.h b/cc/frame_rate_controller.h
index d13936d1e32fa75953fa83093c0d4988fa36da3a..231ddda8a391787025a59f5a6903fe1aff583e36 100644
--- a/cc/frame_rate_controller.h
+++ b/cc/frame_rate_controller.h
@@ -7,8 +7,8 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/time.h"
-#include "cc/timer.h"
namespace cc {
@@ -26,7 +26,7 @@ protected:
class FrameRateControllerTimeSourceAdapter;
-class FrameRateController : public TimerClient {
+class FrameRateController {
public:
explicit FrameRateController(scoped_refptr<TimeSource>);
// Alternate form of FrameRateController with unthrottled frame-rate.
@@ -59,9 +59,7 @@ protected:
void onTimerTick();
void postManualTick();
-
- // TimerClient implementation (used for unthrottled frame-rate).
- virtual void onTimerFired() OVERRIDE;
+ void manualTick();
FrameRateControllerClient* m_client;
int m_numFramesPending;
@@ -73,7 +71,10 @@ protected:
// Members for unthrottled frame-rate.
bool m_isTimeSourceThrottling;
- scoped_ptr<Timer> m_manualTicker;
+ base::WeakPtrFactory<FrameRateController> m_weakFactory;
+ Thread* m_thread;
+
+ DISALLOW_COPY_AND_ASSIGN(FrameRateController);
};
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698