From a6939ca46f65f58425ef5966028013ed65535e8f Mon Sep 17 00:00:00 2001 From: "kbr@google.com" Date: Fri, 18 Feb 2011 17:58:07 +0000 Subject: Set the minimum timer interval on a per-page basis, and adjust it when tabs are brought to the foreground and sent to the background. This CL does not actually increase the background timer interval. That will be done separately, so that it can easily be reverted without removing all of the associated code. BUG=66078 TEST=none (tested manually with minimal test case) Review URL: http://codereview.chromium.org/6532012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75404 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/support/webkit_support.cc | 6 ++++++ webkit/support/webkit_support.h | 4 ++++ 2 files changed, 10 insertions(+) (limited to 'webkit/support') diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index 2e893f9..9e850f4 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -37,6 +37,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" #include "webkit/appcache/web_application_cache_host_impl.h" #include "webkit/glue/media/video_renderer_impl.h" +#include "webkit/glue/webkit_constants.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/webkitclient_impl.h" #include "webkit/glue/webmediaplayer_impl.h" @@ -548,4 +549,9 @@ void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, fileSystem->OpenFileSystem(frame, type, size, create, callbacks); } +// Timers +double GetForegroundTabTimerInterval() { + return webkit_glue::kForegroundTabTimerInterval; +} + } // namespace webkit_support diff --git a/webkit/support/webkit_support.h b/webkit/support/webkit_support.h index 30cb885..d145955 100644 --- a/webkit/support/webkit_support.h +++ b/webkit/support/webkit_support.h @@ -182,6 +182,10 @@ enum { VKEY_F1 = ui::VKEY_F1, }; +// - Timers + +double GetForegroundTabTimerInterval(); + } // namespace webkit_support #endif // WEBKIT_SUPPORT_WEBIT_CLIENT_IMPL_H_ -- cgit v1.1