OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 #include "platform/scroll/ScrollbarTheme.h" | 234 #include "platform/scroll/ScrollbarTheme.h" |
235 #include "platform/text/PlatformLocale.h" | 235 #include "platform/text/PlatformLocale.h" |
236 #include "platform/text/SegmentedString.h" | 236 #include "platform/text/SegmentedString.h" |
237 #include "platform/tracing/TraceEvent.h" | 237 #include "platform/tracing/TraceEvent.h" |
238 #include "platform/weborigin/OriginAccessEntry.h" | 238 #include "platform/weborigin/OriginAccessEntry.h" |
239 #include "platform/weborigin/SchemeRegistry.h" | 239 #include "platform/weborigin/SchemeRegistry.h" |
240 #include "platform/weborigin/SecurityOrigin.h" | 240 #include "platform/weborigin/SecurityOrigin.h" |
241 #include "public/platform/Platform.h" | 241 #include "public/platform/Platform.h" |
242 #include "public/platform/WebAddressSpace.h" | 242 #include "public/platform/WebAddressSpace.h" |
243 #include "public/platform/WebFrameScheduler.h" | 243 #include "public/platform/WebFrameScheduler.h" |
| 244 #include "public/platform/WebPrerenderingSupport.h" |
244 #include "public/platform/WebScheduler.h" | 245 #include "public/platform/WebScheduler.h" |
245 #include "wtf/AutoReset.h" | 246 #include "wtf/AutoReset.h" |
246 #include "wtf/CurrentTime.h" | 247 #include "wtf/CurrentTime.h" |
247 #include "wtf/DateMath.h" | 248 #include "wtf/DateMath.h" |
248 #include "wtf/Functional.h" | 249 #include "wtf/Functional.h" |
249 #include "wtf/HashFunctions.h" | 250 #include "wtf/HashFunctions.h" |
250 #include "wtf/PtrUtil.h" | 251 #include "wtf/PtrUtil.h" |
251 #include "wtf/StdLibExtras.h" | 252 #include "wtf/StdLibExtras.h" |
252 #include "wtf/text/StringBuffer.h" | 253 #include "wtf/text/StringBuffer.h" |
253 #include "wtf/text/TextEncodingRegistry.h" | 254 #include "wtf/text/TextEncodingRegistry.h" |
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1419 | 1420 |
1420 bool Document::isPrefetchOnly() const { | 1421 bool Document::isPrefetchOnly() const { |
1421 if (!m_frame || !m_frame->page()) | 1422 if (!m_frame || !m_frame->page()) |
1422 return false; | 1423 return false; |
1423 | 1424 |
1424 PrerendererClient* prerendererClient = | 1425 PrerendererClient* prerendererClient = |
1425 PrerendererClient::from(m_frame->page()); | 1426 PrerendererClient::from(m_frame->page()); |
1426 return prerendererClient && prerendererClient->isPrefetchOnly(); | 1427 return prerendererClient && prerendererClient->isPrefetchOnly(); |
1427 } | 1428 } |
1428 | 1429 |
| 1430 void Document::onPrefetchFinished() const { |
| 1431 WebPrerenderingSupport::current()->prefetchFinished(); |
| 1432 } |
| 1433 |
1429 String Document::visibilityState() const { | 1434 String Document::visibilityState() const { |
1430 return pageVisibilityStateString(pageVisibilityState()); | 1435 return pageVisibilityStateString(pageVisibilityState()); |
1431 } | 1436 } |
1432 | 1437 |
1433 bool Document::hidden() const { | 1438 bool Document::hidden() const { |
1434 return pageVisibilityState() != PageVisibilityStateVisible; | 1439 return pageVisibilityState() != PageVisibilityStateVisible; |
1435 } | 1440 } |
1436 | 1441 |
1437 void Document::didChangeVisibilityState() { | 1442 void Document::didChangeVisibilityState() { |
1438 dispatchEvent(Event::createBubble(EventTypeNames::visibilitychange)); | 1443 dispatchEvent(Event::createBubble(EventTypeNames::visibilitychange)); |
(...skipping 4961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6400 } | 6405 } |
6401 | 6406 |
6402 void showLiveDocumentInstances() { | 6407 void showLiveDocumentInstances() { |
6403 WeakDocumentSet& set = liveDocumentSet(); | 6408 WeakDocumentSet& set = liveDocumentSet(); |
6404 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6409 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6405 for (Document* document : set) | 6410 for (Document* document : set) |
6406 fprintf(stderr, "- Document %p URL: %s\n", document, | 6411 fprintf(stderr, "- Document %p URL: %s\n", document, |
6407 document->url().getString().utf8().data()); | 6412 document->url().getString().utf8().data()); |
6408 } | 6413 } |
6409 #endif | 6414 #endif |
OLD | NEW |