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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 navigationInfo.isClientRedirect = isClientRedirect; | 567 navigationInfo.isClientRedirect = isClientRedirect; |
568 // Caching could be disabled for requests initiated by DevTools. | 568 // Caching could be disabled for requests initiated by DevTools. |
569 // TODO(ananta) | 569 // TODO(ananta) |
570 // We should extract the network cache state into a global component which | 570 // We should extract the network cache state into a global component which |
571 // can be queried here and wherever necessary. | 571 // can be queried here and wherever necessary. |
572 navigationInfo.isCacheDisabled = | 572 navigationInfo.isCacheDisabled = |
573 devToolsAgent() ? devToolsAgent()->cacheDisabled() : false; | 573 devToolsAgent() ? devToolsAgent()->cacheDisabled() : false; |
574 if (form) | 574 if (form) |
575 navigationInfo.form = WebFormElement(form); | 575 navigationInfo.form = WebFormElement(form); |
576 | 576 |
| 577 std::unique_ptr<SourceLocation> sourceLocation = |
| 578 SourceLocation::capture(m_webFrame->frame()->document()); |
| 579 if (sourceLocation && !sourceLocation->isUnknown()) { |
| 580 navigationInfo.sourceLocation.url = sourceLocation->url(); |
| 581 navigationInfo.sourceLocation.lineNumber = sourceLocation->lineNumber(); |
| 582 navigationInfo.sourceLocation.columnNumber = sourceLocation->columnNumber(); |
| 583 } |
| 584 |
577 WebNavigationPolicy webPolicy = | 585 WebNavigationPolicy webPolicy = |
578 m_webFrame->client()->decidePolicyForNavigation(navigationInfo); | 586 m_webFrame->client()->decidePolicyForNavigation(navigationInfo); |
579 return static_cast<NavigationPolicy>(webPolicy); | 587 return static_cast<NavigationPolicy>(webPolicy); |
580 } | 588 } |
581 | 589 |
582 void LocalFrameClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form) { | 590 void LocalFrameClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form) { |
583 if (m_webFrame->client()) | 591 if (m_webFrame->client()) |
584 m_webFrame->client()->willSendSubmitEvent(WebFormElement(form)); | 592 m_webFrame->client()->willSendSubmitEvent(WebFormElement(form)); |
585 } | 593 } |
586 | 594 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 KURL LocalFrameClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { | 1019 KURL LocalFrameClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { |
1012 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); | 1020 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); |
1013 } | 1021 } |
1014 | 1022 |
1015 void LocalFrameClientImpl::setHasReceivedUserGesture() { | 1023 void LocalFrameClientImpl::setHasReceivedUserGesture() { |
1016 if (m_webFrame->client()) | 1024 if (m_webFrame->client()) |
1017 m_webFrame->client()->setHasReceivedUserGesture(); | 1025 m_webFrame->client()->setHasReceivedUserGesture(); |
1018 } | 1026 } |
1019 | 1027 |
1020 } // namespace blink | 1028 } // namespace blink |
OLD | NEW |