OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
564 navigationInfo.isClientRedirect = isClientRedirect; | 564 navigationInfo.isClientRedirect = isClientRedirect; |
565 // Caching could be disabled for requests initiated by DevTools. | 565 // Caching could be disabled for requests initiated by DevTools. |
566 // TODO(ananta) | 566 // TODO(ananta) |
567 // We should extract the network cache state into a global component which | 567 // We should extract the network cache state into a global component which |
568 // can be queried here and wherever necessary. | 568 // can be queried here and wherever necessary. |
569 navigationInfo.isCacheDisabled = | 569 navigationInfo.isCacheDisabled = |
570 devToolsAgent() ? devToolsAgent()->cacheDisabled() : false; | 570 devToolsAgent() ? devToolsAgent()->cacheDisabled() : false; |
571 if (form) | 571 if (form) |
572 navigationInfo.form = WebFormElement(form); | 572 navigationInfo.form = WebFormElement(form); |
573 | 573 |
574 std::unique_ptr<SourceLocation> sourceLocation = | |
575 SourceLocation::capture(m_webFrame->frame()->document()); | |
576 if (sourceLocation && !sourceLocation->isUnknown()) { | |
577 navigationInfo.hasSourceLocation = true; | |
Nate Chapin
2017/03/01 23:22:19
Rather than have hasSourceLocation, could we eithe
clamy
2017/03/02 13:34:32
Done.
| |
578 navigationInfo.sourceLocation.url = sourceLocation->url(); | |
579 navigationInfo.sourceLocation.lineNumber = sourceLocation->lineNumber(); | |
580 navigationInfo.sourceLocation.columnNumber = sourceLocation->columnNumber(); | |
581 } else { | |
582 navigationInfo.hasSourceLocation = false; | |
583 } | |
584 | |
574 WebNavigationPolicy webPolicy = | 585 WebNavigationPolicy webPolicy = |
575 m_webFrame->client()->decidePolicyForNavigation(navigationInfo); | 586 m_webFrame->client()->decidePolicyForNavigation(navigationInfo); |
576 return static_cast<NavigationPolicy>(webPolicy); | 587 return static_cast<NavigationPolicy>(webPolicy); |
577 } | 588 } |
578 | 589 |
579 void LocalFrameClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form) { | 590 void LocalFrameClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form) { |
580 if (m_webFrame->client()) | 591 if (m_webFrame->client()) |
581 m_webFrame->client()->willSendSubmitEvent(WebFormElement(form)); | 592 m_webFrame->client()->willSendSubmitEvent(WebFormElement(form)); |
582 } | 593 } |
583 | 594 |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1021 KURL LocalFrameClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { | 1032 KURL LocalFrameClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { |
1022 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); | 1033 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); |
1023 } | 1034 } |
1024 | 1035 |
1025 void LocalFrameClientImpl::setHasReceivedUserGesture() { | 1036 void LocalFrameClientImpl::setHasReceivedUserGesture() { |
1026 if (m_webFrame->client()) | 1037 if (m_webFrame->client()) |
1027 m_webFrame->client()->setHasReceivedUserGesture(); | 1038 m_webFrame->client()->setHasReceivedUserGesture(); |
1028 } | 1039 } |
1029 | 1040 |
1030 } // namespace blink | 1041 } // namespace blink |
OLD | NEW |