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

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: Created 6 years, 6 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
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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 if (m_webFrame->client()) 383 if (m_webFrame->client())
384 m_webFrame->client()->didNavigateWithinPage(m_webFrame, WebHistoryItem(i tem), static_cast<WebHistoryCommitType>(commitType)); 384 m_webFrame->client()->didNavigateWithinPage(m_webFrame, WebHistoryItem(i tem), static_cast<WebHistoryCommitType>(commitType));
385 } 385 }
386 386
387 void FrameLoaderClientImpl::dispatchWillClose() 387 void FrameLoaderClientImpl::dispatchWillClose()
388 { 388 {
389 if (m_webFrame->client()) 389 if (m_webFrame->client())
390 m_webFrame->client()->willClose(m_webFrame); 390 m_webFrame->client()->willClose(m_webFrame);
391 } 391 }
392 392
393 void FrameLoaderClientImpl::dispatchDidStartProvisionalLoad() 393 void FrameLoaderClientImpl::dispatchDidStartProvisionalLoad(bool isTransitionNav igation)
394 { 394 {
395 if (m_webFrame->client()) 395 if (m_webFrame->client())
396 m_webFrame->client()->didStartProvisionalLoad(m_webFrame); 396 m_webFrame->client()->didStartProvisionalLoad(m_webFrame, isTransitionNa vigation);
397 } 397 }
398 398
399 void FrameLoaderClientImpl::dispatchDidReceiveTitle(const String& title) 399 void FrameLoaderClientImpl::dispatchDidReceiveTitle(const String& title)
400 { 400 {
401 if (m_webFrame->client()) 401 if (m_webFrame->client())
402 m_webFrame->client()->didReceiveTitle(m_webFrame, title, WebTextDirectio nLeftToRight); 402 m_webFrame->client()->didReceiveTitle(m_webFrame, title, WebTextDirectio nLeftToRight);
403 } 403 }
404 404
405 void FrameLoaderClientImpl::dispatchDidChangeIcons(WebCore::IconType type) 405 void FrameLoaderClientImpl::dispatchDidChangeIcons(WebCore::IconType type)
406 { 406 {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 // redirects, and we need the context. The chain will be cleared when the 450 // redirects, and we need the context. The chain will be cleared when the
451 // provisional load succeeds or fails, not the "real" one. 451 // provisional load succeeds or fails, not the "real" one.
452 } 452 }
453 453
454 void FrameLoaderClientImpl::dispatchDidFirstVisuallyNonEmptyLayout() 454 void FrameLoaderClientImpl::dispatchDidFirstVisuallyNonEmptyLayout()
455 { 455 {
456 if (m_webFrame->client()) 456 if (m_webFrame->client())
457 m_webFrame->client()->didFirstVisuallyNonEmptyLayout(m_webFrame); 457 m_webFrame->client()->didFirstVisuallyNonEmptyLayout(m_webFrame);
458 } 458 }
459 459
460 NavigationPolicy FrameLoaderClientImpl::decidePolicyForNavigation(const Resource Request& request, DocumentLoader* loader, NavigationPolicy policy) 460 NavigationPolicy FrameLoaderClientImpl::decidePolicyForNavigation(const Resource Request& request, DocumentLoader* loader, NavigationPolicy policy, bool isTransi tionNavigation)
461 { 461 {
462 if (!m_webFrame->client()) 462 if (!m_webFrame->client())
463 return NavigationPolicyIgnore; 463 return NavigationPolicyIgnore;
464 WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader(loader); 464 WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader(loader);
465 WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigat ion(m_webFrame, ds->extraData(), WrappedResourceRequest(request), 465 WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigat ion(m_webFrame, ds->extraData(), WrappedResourceRequest(request),
466 ds->navigationType(), static_cast<WebNavigationPolicy>(policy), ds->isRe direct()); 466 ds->navigationType(), static_cast<WebNavigationPolicy>(policy), ds->isRe direct(), isTransitionNavigation);
467 return static_cast<NavigationPolicy>(webPolicy); 467 return static_cast<NavigationPolicy>(webPolicy);
468 } 468 }
469 469
470 void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const String& or igin, const String& markup)
abarth-chromium 2014/06/13 17:18:31 I didn't track down where |origin| came from, but
oystein (OOO til 10th of July) 2014/06/18 00:04:08 My naming is bad; renamed to "allowedDestinationOr
471 {
472 WebViewImpl* webview = m_webFrame->viewImpl();
473 if (!webview->client())
474 return;
475
476 webview->client()->addNavigationTransitionData(origin, markup);
477 }
478
470 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) 479 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request)
471 { 480 {
472 if (m_webFrame->client()) { 481 if (m_webFrame->client()) {
473 WebCachedURLRequest urlRequest(request); 482 WebCachedURLRequest urlRequest(request);
474 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest); 483 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest);
475 } 484 }
476 } 485 }
477 486
478 void FrameLoaderClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form) 487 void FrameLoaderClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form)
479 { 488 {
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 m_webFrame->client()->didAbortLoading(m_webFrame); 817 m_webFrame->client()->didAbortLoading(m_webFrame);
809 } 818 }
810 819
811 void FrameLoaderClientImpl::dispatchDidChangeManifest() 820 void FrameLoaderClientImpl::dispatchDidChangeManifest()
812 { 821 {
813 if (m_webFrame->client()) 822 if (m_webFrame->client())
814 m_webFrame->client()->didChangeManifest(m_webFrame); 823 m_webFrame->client()->didChangeManifest(m_webFrame);
815 } 824 }
816 825
817 } // namespace blink 826 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698