OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 return &pending_prerender_list_; | 236 return &pending_prerender_list_; |
237 } | 237 } |
238 | 238 |
239 bool prerendering_has_been_cancelled() const { | 239 bool prerendering_has_been_cancelled() const { |
240 return prerendering_has_been_cancelled_; | 240 return prerendering_has_been_cancelled_; |
241 } | 241 } |
242 | 242 |
243 virtual content::WebContents* CreateWebContents( | 243 virtual content::WebContents* CreateWebContents( |
244 content::SessionStorageNamespace* session_storage_namespace); | 244 content::SessionStorageNamespace* session_storage_namespace); |
245 | 245 |
| 246 bool prerendering_has_started_; |
| 247 |
246 private: | 248 private: |
247 class TabContentsDelegateImpl; | 249 class TabContentsDelegateImpl; |
248 | 250 |
249 // Needs to be able to call the constructor. | 251 // Needs to be able to call the constructor. |
250 friend class PrerenderContentsFactoryImpl; | 252 friend class PrerenderContentsFactoryImpl; |
251 | 253 |
252 friend class PrerenderRenderViewHostObserver; | 254 friend class PrerenderRenderViewHostObserver; |
253 | 255 |
254 // Message handlers. | 256 // Message handlers. |
255 void OnUpdateFaviconURL(int32 page_id, const std::vector<FaviconURL>& urls); | 257 void OnUpdateFaviconURL(int32 page_id, const std::vector<FaviconURL>& urls); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 295 |
294 bool has_stopped_loading_; | 296 bool has_stopped_loading_; |
295 | 297 |
296 // True when the main frame has finished loading. | 298 // True when the main frame has finished loading. |
297 bool has_finished_loading_; | 299 bool has_finished_loading_; |
298 | 300 |
299 // This must be the same value as the PrerenderTracker has recorded for | 301 // This must be the same value as the PrerenderTracker has recorded for |
300 // |this|, when |this| has a RenderView. | 302 // |this|, when |this| has a RenderView. |
301 FinalStatus final_status_; | 303 FinalStatus final_status_; |
302 | 304 |
303 bool prerendering_has_started_; | |
304 | |
305 // The MatchComplete status of the prerender, indicating how it relates | 305 // The MatchComplete status of the prerender, indicating how it relates |
306 // to being a MatchComplete dummy (see definition of MatchCompleteStatus | 306 // to being a MatchComplete dummy (see definition of MatchCompleteStatus |
307 // above). | 307 // above). |
308 MatchCompleteStatus match_complete_status_; | 308 MatchCompleteStatus match_complete_status_; |
309 | 309 |
310 // Tracks whether or not prerendering has been cancelled by calling Destroy. | 310 // Tracks whether or not prerendering has been cancelled by calling Destroy. |
311 // Used solely to prevent double deletion. | 311 // Used solely to prevent double deletion. |
312 bool prerendering_has_been_cancelled_; | 312 bool prerendering_has_been_cancelled_; |
313 | 313 |
314 // Time at which we started to load the URL. This is used to compute | 314 // Time at which we started to load the URL. This is used to compute |
(...skipping 30 matching lines...) Expand all Loading... |
345 | 345 |
346 // The size of the WebView from the launching page. | 346 // The size of the WebView from the launching page. |
347 gfx::Size size_; | 347 gfx::Size size_; |
348 | 348 |
349 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); | 349 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); |
350 }; | 350 }; |
351 | 351 |
352 } // namespace prerender | 352 } // namespace prerender |
353 | 353 |
354 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ | 354 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
OLD | NEW |