| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 #include "public/web/WebDOMEvent.h" | 76 #include "public/web/WebDOMEvent.h" |
| 77 #include "public/web/WebDocument.h" | 77 #include "public/web/WebDocument.h" |
| 78 #include "public/web/WebFormElement.h" | 78 #include "public/web/WebFormElement.h" |
| 79 #include "public/web/WebFrameClient.h" | 79 #include "public/web/WebFrameClient.h" |
| 80 #include "public/web/WebNode.h" | 80 #include "public/web/WebNode.h" |
| 81 #include "public/web/WebPermissionClient.h" | 81 #include "public/web/WebPermissionClient.h" |
| 82 #include "public/web/WebPlugin.h" | 82 #include "public/web/WebPlugin.h" |
| 83 #include "public/web/WebPluginParams.h" | 83 #include "public/web/WebPluginParams.h" |
| 84 #include "public/web/WebPluginPlaceholder.h" | 84 #include "public/web/WebPluginPlaceholder.h" |
| 85 #include "public/web/WebSecurityOrigin.h" | 85 #include "public/web/WebSecurityOrigin.h" |
| 86 #include "public/web/WebTransitionElementData.h" |
| 86 #include "public/web/WebViewClient.h" | 87 #include "public/web/WebViewClient.h" |
| 87 #include "web/PluginPlaceholderImpl.h" | 88 #include "web/PluginPlaceholderImpl.h" |
| 88 #include "web/SharedWorkerRepositoryClientImpl.h" | 89 #include "web/SharedWorkerRepositoryClientImpl.h" |
| 89 #include "web/WebDataSourceImpl.h" | 90 #include "web/WebDataSourceImpl.h" |
| 90 #include "web/WebDevToolsAgentPrivate.h" | 91 #include "web/WebDevToolsAgentPrivate.h" |
| 91 #include "web/WebLocalFrameImpl.h" | 92 #include "web/WebLocalFrameImpl.h" |
| 92 #include "web/WebPluginContainerImpl.h" | 93 #include "web/WebPluginContainerImpl.h" |
| 93 #include "web/WebPluginLoadObserver.h" | 94 #include "web/WebPluginLoadObserver.h" |
| 94 #include "web/WebViewImpl.h" | 95 #include "web/WebViewImpl.h" |
| 95 #include "wtf/StringExtras.h" | 96 #include "wtf/StringExtras.h" |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 navigationInfo.extraData = ds->extraData(); | 472 navigationInfo.extraData = ds->extraData(); |
| 472 navigationInfo.navigationType = ds->navigationType(); | 473 navigationInfo.navigationType = ds->navigationType(); |
| 473 navigationInfo.defaultPolicy = static_cast<WebNavigationPolicy>(policy); | 474 navigationInfo.defaultPolicy = static_cast<WebNavigationPolicy>(policy); |
| 474 navigationInfo.isRedirect = ds->isRedirect(); | 475 navigationInfo.isRedirect = ds->isRedirect(); |
| 475 navigationInfo.isTransitionNavigation = isTransitionNavigation; | 476 navigationInfo.isTransitionNavigation = isTransitionNavigation; |
| 476 | 477 |
| 477 WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigat
ion(navigationInfo); | 478 WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigat
ion(navigationInfo); |
| 478 return static_cast<NavigationPolicy>(webPolicy); | 479 return static_cast<NavigationPolicy>(webPolicy); |
| 479 } | 480 } |
| 480 | 481 |
| 481 void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const String& al
lowedDestinationOrigin, const String& selector, const String& markup) | 482 void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const Document::
TransitionElementData& data) |
| 482 { | 483 { |
| 483 if (m_webFrame->client()) | 484 if (!m_webFrame->client()) |
| 484 m_webFrame->client()->addNavigationTransitionData(allowedDestinationOrig
in, selector, markup); | 485 return; |
| 486 |
| 487 // FIXME: change to use WebTransitionElementData after the chrome side is do
ne. |
| 488 Vector<String> ids; |
| 489 Vector<IntRect> rects; |
| 490 for (size_t i = 0; i < data.elements.size(); ++i) { |
| 491 ids.append(data.elements[i].id); |
| 492 rects.append(data.elements[i].rect); |
| 493 } |
| 494 m_webFrame->client()->addNavigationTransitionData( |
| 495 WebString(data.scope), |
| 496 WebString(data.selector), |
| 497 WebString(data.markup), |
| 498 WebVector<WebString>(ids), |
| 499 WebVector<WebRect>(rects)); |
| 485 } | 500 } |
| 486 | 501 |
| 487 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) | 502 void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) |
| 488 { | 503 { |
| 489 if (m_webFrame->client()) { | 504 if (m_webFrame->client()) { |
| 490 WebCachedURLRequest urlRequest(request); | 505 WebCachedURLRequest urlRequest(request); |
| 491 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest); | 506 m_webFrame->client()->willRequestResource(m_webFrame, urlRequest); |
| 492 } | 507 } |
| 493 } | 508 } |
| 494 | 509 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 | 883 |
| 869 unsigned FrameLoaderClientImpl::backForwardLength() | 884 unsigned FrameLoaderClientImpl::backForwardLength() |
| 870 { | 885 { |
| 871 WebViewImpl* webview = m_webFrame->viewImpl(); | 886 WebViewImpl* webview = m_webFrame->viewImpl(); |
| 872 if (!webview || !webview->client()) | 887 if (!webview || !webview->client()) |
| 873 return 0; | 888 return 0; |
| 874 return webview->client()->historyBackListCount() + 1 + webview->client()->hi
storyForwardListCount(); | 889 return webview->client()->historyBackListCount() + 1 + webview->client()->hi
storyForwardListCount(); |
| 875 } | 890 } |
| 876 | 891 |
| 877 } // namespace blink | 892 } // namespace blink |
| OLD | NEW |