OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 { | 507 { |
508 ASSERT(m_documentLoader || frame()->loader().documentLoader()); | 508 ASSERT(m_documentLoader || frame()->loader().documentLoader()); |
509 if (m_documentLoader) | 509 if (m_documentLoader) |
510 return frame()->loader().client()->isControlledByServiceWorker(*m_docume
ntLoader); | 510 return frame()->loader().client()->isControlledByServiceWorker(*m_docume
ntLoader); |
511 // m_documentLoader is null while loading resources from an HTML import. | 511 // m_documentLoader is null while loading resources from an HTML import. |
512 // In such cases whether the request is controlled by ServiceWorker or not | 512 // In such cases whether the request is controlled by ServiceWorker or not |
513 // is determined by the document loader of the frame. | 513 // is determined by the document loader of the frame. |
514 return frame()->loader().client()->isControlledByServiceWorker(*frame()->loa
der().documentLoader()); | 514 return frame()->loader().client()->isControlledByServiceWorker(*frame()->loa
der().documentLoader()); |
515 } | 515 } |
516 | 516 |
517 int64_t FrameFetchContext::serviceWorkerID() const | 517 std::string FrameFetchContext::serviceWorkerID() const |
518 { | 518 { |
519 ASSERT(m_documentLoader || frame()->loader().documentLoader()); | 519 ASSERT(m_documentLoader || frame()->loader().documentLoader()); |
520 if (m_documentLoader) | 520 if (m_documentLoader) |
521 return frame()->loader().client()->serviceWorkerID(*m_documentLoader); | 521 return frame()->loader().client()->serviceWorkerID(*m_documentLoader); |
522 // m_documentLoader is null while loading resources from an HTML import. | 522 // m_documentLoader is null while loading resources from an HTML import. |
523 // In such cases a service worker ID could be retrieved from the document | 523 // In such cases a service worker ID could be retrieved from the document |
524 // loader of the frame. | 524 // loader of the frame. |
525 return frame()->loader().client()->serviceWorkerID(*frame()->loader().docume
ntLoader()); | 525 return frame()->loader().client()->serviceWorkerID(*frame()->loader().docume
ntLoader()); |
526 } | 526 } |
527 | 527 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 return !frame()->isMainFrame() && frame()->settings() && frame()->settings()
->lowPriorityIframes(); | 661 return !frame()->isMainFrame() && frame()->settings() && frame()->settings()
->lowPriorityIframes(); |
662 } | 662 } |
663 | 663 |
664 DEFINE_TRACE(FrameFetchContext) | 664 DEFINE_TRACE(FrameFetchContext) |
665 { | 665 { |
666 visitor->trace(m_document); | 666 visitor->trace(m_document); |
667 FetchContext::trace(visitor); | 667 FetchContext::trace(visitor); |
668 } | 668 } |
669 | 669 |
670 } // namespace blink | 670 } // namespace blink |
OLD | NEW |