Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: Source/web/FrameLoaderClientImpl.cpp

Issue 319573008: Navigation transitions: Initiate navigation transition and send serialized markup to Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@transitions_editing
Patch Set: Rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/FrameLoaderClientImpl.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 if (m_webFrame->client()) 384 if (m_webFrame->client())
385 m_webFrame->client()->didNavigateWithinPage(m_webFrame, WebHistoryItem(i tem), static_cast<WebHistoryCommitType>(commitType)); 385 m_webFrame->client()->didNavigateWithinPage(m_webFrame, WebHistoryItem(i tem), static_cast<WebHistoryCommitType>(commitType));
386 } 386 }
387 387
388 void FrameLoaderClientImpl::dispatchWillClose() 388 void FrameLoaderClientImpl::dispatchWillClose()
389 { 389 {
390 if (m_webFrame->client()) 390 if (m_webFrame->client())
391 m_webFrame->client()->willClose(m_webFrame); 391 m_webFrame->client()->willClose(m_webFrame);
392 } 392 }
393 393
394 void FrameLoaderClientImpl::dispatchDidStartProvisionalLoad() 394 void FrameLoaderClientImpl::dispatchDidStartProvisionalLoad(bool isTransitionNav igation)
395 { 395 {
396 if (m_webFrame->client()) 396 if (m_webFrame->client())
397 m_webFrame->client()->didStartProvisionalLoad(m_webFrame); 397 m_webFrame->client()->didStartProvisionalLoad(m_webFrame, isTransitionNa vigation);
398 } 398 }
399 399
400 void FrameLoaderClientImpl::dispatchDidReceiveTitle(const String& title) 400 void FrameLoaderClientImpl::dispatchDidReceiveTitle(const String& title)
401 { 401 {
402 if (m_webFrame->client()) 402 if (m_webFrame->client())
403 m_webFrame->client()->didReceiveTitle(m_webFrame, title, WebTextDirectio nLeftToRight); 403 m_webFrame->client()->didReceiveTitle(m_webFrame, title, WebTextDirectio nLeftToRight);
404 } 404 }
405 405
406 void FrameLoaderClientImpl::dispatchDidChangeIcons(WebCore::IconType type) 406 void FrameLoaderClientImpl::dispatchDidChangeIcons(WebCore::IconType type)
407 { 407 {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 if (m_webFrame->client()) 457 if (m_webFrame->client())
458 m_webFrame->client()->didFirstVisuallyNonEmptyLayout(m_webFrame); 458 m_webFrame->client()->didFirstVisuallyNonEmptyLayout(m_webFrame);
459 } 459 }
460 460
461 void FrameLoaderClientImpl::dispatchDidChangeThemeColor() 461 void FrameLoaderClientImpl::dispatchDidChangeThemeColor()
462 { 462 {
463 if (m_webFrame->client()) 463 if (m_webFrame->client())
464 m_webFrame->client()->didChangeThemeColor(); 464 m_webFrame->client()->didChangeThemeColor();
465 } 465 }
466 466
467 NavigationPolicy FrameLoaderClientImpl::decidePolicyForNavigation(const Resource Request& request, DocumentLoader* loader, NavigationPolicy policy) 467 NavigationPolicy FrameLoaderClientImpl::decidePolicyForNavigation(const Resource Request& request, DocumentLoader* loader, NavigationPolicy policy, bool isTransi tionNavigation)
468 { 468 {
469 if (!m_webFrame->client()) 469 if (!m_webFrame->client())
470 return NavigationPolicyIgnore; 470 return NavigationPolicyIgnore;
471 WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader(loader); 471 WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader(loader);
472 WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigat ion(m_webFrame, ds->extraData(), WrappedResourceRequest(request), 472
473 ds->navigationType(), static_cast<WebNavigationPolicy>(policy), ds->isRe direct()); 473 WrappedResourceRequest wrappedResourceRequest(request);
474 WebFrameClient::NavigationPolicyInfo navigationInfo(wrappedResourceRequest);
475 navigationInfo.frame = m_webFrame;
476 navigationInfo.extraData = ds->extraData();
477 navigationInfo.navigationType = ds->navigationType();
478 navigationInfo.defaultPolicy = static_cast<WebNavigationPolicy>(policy);
479 navigationInfo.isRedirect = ds->isRedirect();
480 navigationInfo.isTransitionNavigation = isTransitionNavigation;
481
482 WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigat ion(navigationInfo);
474 return static_cast<NavigationPolicy>(webPolicy); 483 return static_cast<NavigationPolicy>(webPolicy);
475 } 484 }
476 485
486 void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const String& al lowedDestinationOrigin, const String& selector, const String& markup)
487 {
488 if (m_webFrame->client())
489 m_webFrame->client()->addNavigationTransitionData(allowedDestinationOrig in, selector, markup);
490 }
491
477 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) 492 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request)
478 { 493 {
479 if (m_webFrame->client()) { 494 if (m_webFrame->client()) {
480 WebCachedURLRequest urlRequest(request); 495 WebCachedURLRequest urlRequest(request);
481 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest); 496 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest);
482 } 497 }
483 } 498 }
484 499
485 void FrameLoaderClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form) 500 void FrameLoaderClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form)
486 { 501 {
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 m_webFrame->client()->didAbortLoading(m_webFrame); 830 m_webFrame->client()->didAbortLoading(m_webFrame);
816 } 831 }
817 832
818 void FrameLoaderClientImpl::dispatchDidChangeManifest() 833 void FrameLoaderClientImpl::dispatchDidChangeManifest()
819 { 834 {
820 if (m_webFrame->client()) 835 if (m_webFrame->client())
821 m_webFrame->client()->didChangeManifest(m_webFrame); 836 m_webFrame->client()->didChangeManifest(m_webFrame);
822 } 837 }
823 838
824 } // namespace blink 839 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/FrameLoaderClientImpl.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698