| 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 WebTransitionElementData webData(data.scope, data.selector, data.markup, dat
a.elements); |
| 494 Vector<String> ids; | 494 m_webFrame->client()->addNavigationTransitionData(webData); |
| 495 Vector<IntRect> rects; | |
| 496 for (size_t i = 0; i < data.elements.size(); ++i) { | |
| 497 ids.append(data.elements[i].id); | |
| 498 rects.append(data.elements[i].rect); | |
| 499 } | |
| 500 m_webFrame->client()->addNavigationTransitionData( | |
| 501 WebString(data.scope), | |
| 502 WebString(data.selector), | |
| 503 WebString(data.markup), | |
| 504 WebVector<WebString>(ids), | |
| 505 WebVector<WebRect>(rects)); | |
| 506 } | 495 } |
| 507 | 496 |
| 508 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) | 497 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) |
| 509 { | 498 { |
| 510 if (m_webFrame->client()) { | 499 if (m_webFrame->client()) { |
| 511 WebCachedURLRequest urlRequest(request); | 500 WebCachedURLRequest urlRequest(request); |
| 512 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest); | 501 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest); |
| 513 } | 502 } |
| 514 } | 503 } |
| 515 | 504 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 | 878 |
| 890 unsigned FrameLoaderClientImpl::backForwardLength() | 879 unsigned FrameLoaderClientImpl::backForwardLength() |
| 891 { | 880 { |
| 892 WebViewImpl* webview = m_webFrame->viewImpl(); | 881 WebViewImpl* webview = m_webFrame->viewImpl(); |
| 893 if (!webview || !webview->client()) | 882 if (!webview || !webview->client()) |
| 894 return 0; | 883 return 0; |
| 895 return webview->client()->historyBackListCount() + 1 + webview->client()->hi
storyForwardListCount(); | 884 return webview->client()->historyBackListCount() + 1 + webview->client()->hi
storyForwardListCount(); |
| 896 } | 885 } |
| 897 | 886 |
| 898 } // namespace blink | 887 } // namespace blink |
| OLD | NEW |