OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_RENDERER_NAVIGATION_STATE_H_ | 5 #ifndef CHROME_RENDERER_NAVIGATION_STATE_H_ |
6 #define CHROME_RENDERER_NAVIGATION_STATE_H_ | 6 #define CHROME_RENDERER_NAVIGATION_STATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 } | 59 } |
60 | 60 |
61 static NavigationState* FromDataSource(WebKit::WebDataSource* ds) { | 61 static NavigationState* FromDataSource(WebKit::WebDataSource* ds) { |
62 return static_cast<NavigationState*>(ds->extraData()); | 62 return static_cast<NavigationState*>(ds->extraData()); |
63 } | 63 } |
64 | 64 |
65 UserScriptIdleScheduler* user_script_idle_scheduler() { | 65 UserScriptIdleScheduler* user_script_idle_scheduler() { |
66 return user_script_idle_scheduler_.get(); | 66 return user_script_idle_scheduler_.get(); |
67 } | 67 } |
68 void set_user_script_idle_scheduler(UserScriptIdleScheduler* scheduler); | 68 void set_user_script_idle_scheduler(UserScriptIdleScheduler* scheduler); |
| 69 void swap_user_script_idle_scheduler(NavigationState* state); |
69 | 70 |
70 // Contains the page_id for this navigation or -1 if there is none yet. | 71 // Contains the page_id for this navigation or -1 if there is none yet. |
71 int32 pending_page_id() const { return pending_page_id_; } | 72 int32 pending_page_id() const { return pending_page_id_; } |
72 | 73 |
73 // If pending_page_id() is not -1, then this contains the corresponding | 74 // If pending_page_id() is not -1, then this contains the corresponding |
74 // offset of the page in the back/forward history list. | 75 // offset of the page in the back/forward history list. |
75 int pending_history_list_offset() const { | 76 int pending_history_list_offset() const { |
76 return pending_history_list_offset_; | 77 return pending_history_list_offset_; |
77 } | 78 } |
78 | 79 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 bool was_within_same_page_; | 308 bool was_within_same_page_; |
308 | 309 |
309 // A prefetcher is a page that contains link rel=prefetch elements. | 310 // A prefetcher is a page that contains link rel=prefetch elements. |
310 bool was_prefetcher_; | 311 bool was_prefetcher_; |
311 bool was_referred_by_prefetcher_; | 312 bool was_referred_by_prefetcher_; |
312 | 313 |
313 DISALLOW_COPY_AND_ASSIGN(NavigationState); | 314 DISALLOW_COPY_AND_ASSIGN(NavigationState); |
314 }; | 315 }; |
315 | 316 |
316 #endif // CHROME_RENDERER_NAVIGATION_STATE_H_ | 317 #endif // CHROME_RENDERER_NAVIGATION_STATE_H_ |
OLD | NEW |