| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 if (m_webFrame->client()) | 376 if (m_webFrame->client()) |
| 377 m_webFrame->client()->didNavigateWithinPage(m_webFrame, WebHistoryItem(i
tem), static_cast<WebHistoryCommitType>(commitType)); | 377 m_webFrame->client()->didNavigateWithinPage(m_webFrame, WebHistoryItem(i
tem), static_cast<WebHistoryCommitType>(commitType)); |
| 378 } | 378 } |
| 379 | 379 |
| 380 void FrameLoaderClientImpl::dispatchWillClose() | 380 void FrameLoaderClientImpl::dispatchWillClose() |
| 381 { | 381 { |
| 382 if (m_webFrame->client()) | 382 if (m_webFrame->client()) |
| 383 m_webFrame->client()->willClose(m_webFrame); | 383 m_webFrame->client()->willClose(m_webFrame); |
| 384 } | 384 } |
| 385 | 385 |
| 386 void FrameLoaderClientImpl::dispatchDidStartProvisionalLoad() | 386 void FrameLoaderClientImpl::dispatchDidStartProvisionalLoad(bool isTransitionNav
igation) |
| 387 { | 387 { |
| 388 if (m_webFrame->client()) | 388 if (m_webFrame->client()) |
| 389 m_webFrame->client()->didStartProvisionalLoad(m_webFrame); | 389 m_webFrame->client()->didStartProvisionalLoad(m_webFrame, isTransitionNa
vigation); |
| 390 } | 390 } |
| 391 | 391 |
| 392 void FrameLoaderClientImpl::dispatchDidReceiveTitle(const String& title) | 392 void FrameLoaderClientImpl::dispatchDidReceiveTitle(const String& title) |
| 393 { | 393 { |
| 394 if (m_webFrame->client()) | 394 if (m_webFrame->client()) |
| 395 m_webFrame->client()->didReceiveTitle(m_webFrame, title, WebTextDirectio
nLeftToRight); | 395 m_webFrame->client()->didReceiveTitle(m_webFrame, title, WebTextDirectio
nLeftToRight); |
| 396 } | 396 } |
| 397 | 397 |
| 398 void FrameLoaderClientImpl::dispatchDidChangeIcons(WebCore::IconType type) | 398 void FrameLoaderClientImpl::dispatchDidChangeIcons(WebCore::IconType type) |
| 399 { | 399 { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 if (m_webFrame->client()) | 449 if (m_webFrame->client()) |
| 450 m_webFrame->client()->didFirstVisuallyNonEmptyLayout(m_webFrame); | 450 m_webFrame->client()->didFirstVisuallyNonEmptyLayout(m_webFrame); |
| 451 } | 451 } |
| 452 | 452 |
| 453 void FrameLoaderClientImpl::dispatchDidChangeBrandColor() | 453 void FrameLoaderClientImpl::dispatchDidChangeBrandColor() |
| 454 { | 454 { |
| 455 if (m_webFrame->client()) | 455 if (m_webFrame->client()) |
| 456 m_webFrame->client()->didChangeBrandColor(m_webFrame); | 456 m_webFrame->client()->didChangeBrandColor(m_webFrame); |
| 457 } | 457 } |
| 458 | 458 |
| 459 NavigationPolicy FrameLoaderClientImpl::decidePolicyForNavigation(const Resource
Request& request, DocumentLoader* loader, NavigationPolicy policy) | 459 NavigationPolicy FrameLoaderClientImpl::decidePolicyForNavigation(const Resource
Request& request, DocumentLoader* loader, NavigationPolicy policy, bool isTransi
tionNavigation) |
| 460 { | 460 { |
| 461 if (!m_webFrame->client()) | 461 if (!m_webFrame->client()) |
| 462 return NavigationPolicyIgnore; | 462 return NavigationPolicyIgnore; |
| 463 WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader(loader); | 463 WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader(loader); |
| 464 WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigat
ion(m_webFrame, ds->extraData(), WrappedResourceRequest(request), | 464 |
| 465 ds->navigationType(), static_cast<WebNavigationPolicy>(policy), ds->isRe
direct()); | 465 WrappedResourceRequest wrappedResourceRequest(request); |
| 466 WebFrameClient::NavigationPolicyInfo navigationInfo(wrappedResourceRequest); |
| 467 navigationInfo.frame = m_webFrame; |
| 468 navigationInfo.extraData = ds->extraData(); |
| 469 navigationInfo.navigationType = ds->navigationType(); |
| 470 navigationInfo.defaultPolicy = static_cast<WebNavigationPolicy>(policy); |
| 471 navigationInfo.isRedirect = ds->isRedirect(); |
| 472 navigationInfo.isTransitionNavigation = isTransitionNavigation; |
| 473 |
| 474 WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigat
ion(navigationInfo); |
| 466 return static_cast<NavigationPolicy>(webPolicy); | 475 return static_cast<NavigationPolicy>(webPolicy); |
| 467 } | 476 } |
| 468 | 477 |
| 478 void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const String& al
lowedDestinationOrigin, const String& markup) |
| 479 { |
| 480 if (m_webFrame->client()) |
| 481 m_webFrame->client()->addNavigationTransitionData(allowedDestinationOrig
in, markup); |
| 482 } |
| 483 |
| 469 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) | 484 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) |
| 470 { | 485 { |
| 471 if (m_webFrame->client()) { | 486 if (m_webFrame->client()) { |
| 472 WebCachedURLRequest urlRequest(request); | 487 WebCachedURLRequest urlRequest(request); |
| 473 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest); | 488 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest); |
| 474 } | 489 } |
| 475 } | 490 } |
| 476 | 491 |
| 477 void FrameLoaderClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form) | 492 void FrameLoaderClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form) |
| 478 { | 493 { |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 m_webFrame->client()->didAbortLoading(m_webFrame); | 822 m_webFrame->client()->didAbortLoading(m_webFrame); |
| 808 } | 823 } |
| 809 | 824 |
| 810 void FrameLoaderClientImpl::dispatchDidChangeManifest() | 825 void FrameLoaderClientImpl::dispatchDidChangeManifest() |
| 811 { | 826 { |
| 812 if (m_webFrame->client()) | 827 if (m_webFrame->client()) |
| 813 m_webFrame->client()->didChangeManifest(m_webFrame); | 828 m_webFrame->client()->didChangeManifest(m_webFrame); |
| 814 } | 829 } |
| 815 | 830 |
| 816 } // namespace blink | 831 } // namespace blink |
| OLD | NEW |