summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/navigation_state.h
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-03 05:02:30 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-03 05:02:30 +0000
commitfa7b6b547368d12ccd61f6cbf251f2ff0d37b504 (patch)
treec28ef0f99dc70cd1dc8acf70f3cc8af5d2cb9072 /chrome/renderer/navigation_state.h
parentd12f7a9539c490b3e008d234526a67d0496972b3 (diff)
downloadchromium_src-fa7b6b547368d12ccd61f6cbf251f2ff0d37b504.zip
chromium_src-fa7b6b547368d12ccd61f6cbf251f2ff0d37b504.tar.gz
chromium_src-fa7b6b547368d12ccd61f6cbf251f2ff0d37b504.tar.bz2
Re-commit "Add new user script injection point:
document_idle." Original code review: http://codereview.chromium.org/339064 BUG=26126 TBR=rafaelw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/navigation_state.h')
-rw-r--r--chrome/renderer/navigation_state.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/renderer/navigation_state.h b/chrome/renderer/navigation_state.h
index 46031dd..394aee9 100644
--- a/chrome/renderer/navigation_state.h
+++ b/chrome/renderer/navigation_state.h
@@ -8,6 +8,7 @@
#include "base/scoped_ptr.h"
#include "base/time.h"
#include "chrome/common/page_transition_types.h"
+#include "chrome/renderer/user_script_idle_scheduler.h"
#include "webkit/api/public/WebDataSource.h"
#include "webkit/glue/alt_error_page_resource_fetcher.h"
#include "webkit/glue/password_form.h"
@@ -33,6 +34,13 @@ class NavigationState : public WebKit::WebDataSource::ExtraData {
return static_cast<NavigationState*>(ds->extraData());
}
+ UserScriptIdleScheduler* user_script_idle_scheduler() {
+ return user_script_idle_scheduler_.get();
+ }
+ void set_user_script_idle_scheduler(UserScriptIdleScheduler* scheduler) {
+ user_script_idle_scheduler_.reset(scheduler);
+ }
+
// Contains the page_id for this navigation or -1 if there is none yet.
int32 pending_page_id() const { return pending_page_id_; }
@@ -173,7 +181,8 @@ class NavigationState : public WebKit::WebDataSource::ExtraData {
request_committed_(false),
is_content_initiated_(is_content_initiated),
pending_page_id_(pending_page_id),
- postpone_loading_data_(false) {
+ postpone_loading_data_(false),
+ user_script_idle_scheduler_(NULL) {
}
PageTransition::Type transition_type_;
@@ -195,6 +204,7 @@ class NavigationState : public WebKit::WebDataSource::ExtraData {
std::string security_info_;
bool postpone_loading_data_;
std::string postponed_data_;
+ scoped_ptr<UserScriptIdleScheduler> user_script_idle_scheduler_;
DISALLOW_COPY_AND_ASSIGN(NavigationState);
};