Upstream support for WebKit shared timer toggling.
This is part of Chrome for Android upstreaming.
These changes are used on the Java app side to suspend webkit timers in all
renderers when activity is paused and resume timers when activity is resumed.
This reduces javascript execution when the app is in the background, causing
lesser CPU and network usage. It doesn't stop javascript altogether because if
the page JS is constantly running without relying on timers/events then it
continues to run (but that is quite rare).
Review URL: https://chromiumcodereview.appspot.com/10690023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147438 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index d3048d78..d2c4257 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -126,11 +126,12 @@
virtual int64 GetIdleNotificationDelayInMs() const OVERRIDE;
virtual void SetIdleNotificationDelayInMs(
int64 idle_notification_delay_in_ms) OVERRIDE;
+ virtual void ToggleWebKitSharedTimer(bool suspend) OVERRIDE;
+ virtual void UpdateHistograms(int sequence_number) OVERRIDE;
#if defined(OS_WIN)
virtual void PreCacheFont(const LOGFONT& log_font) OVERRIDE;
virtual void ReleaseCachedFonts() OVERRIDE;
#endif
- virtual void UpdateHistograms(int sequence_number) OVERRIDE;
// content::ChildThread:
virtual bool IsWebFrameValid(WebKit::WebFrame* frame) OVERRIDE;