Idle module

Copyright © 2011 Opera Software ASA. All rights reserved. This file is part of the Opera web browser. It may not be distributed under any circumstances.

Introduction

The idle module implements idle detection in Core. Idle detection attempts to solve the problem of when Core is "sufficiently idle" for a testcase to proceed to the next action. (In particular, testcases often want to know when the consequences of a click on a page are "finished").

The idle detection works by placing probe-like objects around in code which performs central tasks, like paint and reflow. These objects report to a manager when their related activity beings and ends, and the manager in turn reports to a set of listeners when we move from an idle state with no live activities, to a busy state (and vice-versa).

API

Components interested in knowing when we are idle (or when we leave an idle state) must implement the OpActivityListener interface, and subscribe for the events using OpIdleDetector::AddListener. The OpIdleDetector singleton is globally available under the alias g_idle_detector.

Please see the generated documentation for details. You must run doxygen in the modules/idle/documentation folder to make this documentation available.