| 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.sourceLocation.url = sourceLocation->url(); |
| 578 navigationInfo.sourceLocation.lineNumber = sourceLocation->lineNumber(); |
| 579 navigationInfo.sourceLocation.columnNumber = sourceLocation->columnNumber(); |
| 580 } |
| 581 |
| 574 WebNavigationPolicy webPolicy = | 582 WebNavigationPolicy webPolicy = |
| 575 m_webFrame->client()->decidePolicyForNavigation(navigationInfo); | 583 m_webFrame->client()->decidePolicyForNavigation(navigationInfo); |
| 576 return static_cast<NavigationPolicy>(webPolicy); | 584 return static_cast<NavigationPolicy>(webPolicy); |
| 577 } | 585 } |
| 578 | 586 |
| 579 void LocalFrameClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form) { | 587 void LocalFrameClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form) { |
| 580 if (m_webFrame->client()) | 588 if (m_webFrame->client()) |
| 581 m_webFrame->client()->willSendSubmitEvent(WebFormElement(form)); | 589 m_webFrame->client()->willSendSubmitEvent(WebFormElement(form)); |
| 582 } | 590 } |
| 583 | 591 |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 KURL LocalFrameClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { | 1029 KURL LocalFrameClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { |
| 1022 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); | 1030 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); |
| 1023 } | 1031 } |
| 1024 | 1032 |
| 1025 void LocalFrameClientImpl::setHasReceivedUserGesture() { | 1033 void LocalFrameClientImpl::setHasReceivedUserGesture() { |
| 1026 if (m_webFrame->client()) | 1034 if (m_webFrame->client()) |
| 1027 m_webFrame->client()->setHasReceivedUserGesture(); | 1035 m_webFrame->client()->setHasReceivedUserGesture(); |
| 1028 } | 1036 } |
| 1029 | 1037 |
| 1030 } // namespace blink | 1038 } // namespace blink |
| OLD | NEW |