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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 | 483 |
484 WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigat
ion(navigationInfo); | 484 WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigat
ion(navigationInfo); |
485 return static_cast<NavigationPolicy>(webPolicy); | 485 return static_cast<NavigationPolicy>(webPolicy); |
486 } | 486 } |
487 | 487 |
488 void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const Document::
TransitionElementData& data) | 488 void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const Document::
TransitionElementData& data) |
489 { | 489 { |
490 if (!m_webFrame->client()) | 490 if (!m_webFrame->client()) |
491 return; | 491 return; |
492 | 492 |
493 // FIXME: change to use WebTransitionElementData after the chrome side is do
ne. | 493 WebVector<WebTransitionElement> webElements(data.elements.size()); |
494 Vector<String> ids; | |
495 Vector<IntRect> rects; | |
496 for (size_t i = 0; i < data.elements.size(); ++i) { | 494 for (size_t i = 0; i < data.elements.size(); ++i) { |
497 ids.append(data.elements[i].id); | 495 webElements[i].id = data.elements[i].id; |
498 rects.append(data.elements[i].rect); | 496 webElements[i].rect = data.elements[i].rect; |
499 } | 497 } |
500 m_webFrame->client()->addNavigationTransitionData( | 498 WebTransitionElementData webData(data.scope, data.selector, data.markup, web
Elements); |
501 WebString(data.scope), | 499 m_webFrame->client()->addNavigationTransitionData(webData); |
502 WebString(data.selector), | |
503 WebString(data.markup), | |
504 WebVector<WebString>(ids), | |
505 WebVector<WebRect>(rects)); | |
506 } | 500 } |
507 | 501 |
508 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) | 502 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) |
509 { | 503 { |
510 if (m_webFrame->client()) { | 504 if (m_webFrame->client()) { |
511 WebCachedURLRequest urlRequest(request); | 505 WebCachedURLRequest urlRequest(request); |
512 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest); | 506 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest); |
513 } | 507 } |
514 } | 508 } |
515 | 509 |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 | 883 |
890 unsigned FrameLoaderClientImpl::backForwardLength() | 884 unsigned FrameLoaderClientImpl::backForwardLength() |
891 { | 885 { |
892 WebViewImpl* webview = m_webFrame->viewImpl(); | 886 WebViewImpl* webview = m_webFrame->viewImpl(); |
893 if (!webview || !webview->client()) | 887 if (!webview || !webview->client()) |
894 return 0; | 888 return 0; |
895 return webview->client()->historyBackListCount() + 1 + webview->client()->hi
storyForwardListCount(); | 889 return webview->client()->historyBackListCount() + 1 + webview->client()->hi
storyForwardListCount(); |
896 } | 890 } |
897 | 891 |
898 } // namespace blink | 892 } // namespace blink |
OLD | NEW |