Chromium Code Reviews| Index: Source/web/FrameLoaderClientImpl.cpp |
| diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp |
| index 107504056be14563f79a833c878ac0f713516dbe..fe84f0842552a9a30245672a9ec8c7a119871b4a 100644 |
| --- a/Source/web/FrameLoaderClientImpl.cpp |
| +++ b/Source/web/FrameLoaderClientImpl.cpp |
| @@ -83,6 +83,7 @@ |
| #include "public/web/WebPluginParams.h" |
| #include "public/web/WebPluginPlaceholder.h" |
| #include "public/web/WebSecurityOrigin.h" |
| +#include "public/web/WebTransitionElementData.h" |
| #include "public/web/WebViewClient.h" |
| #include "web/PluginPlaceholderImpl.h" |
| #include "web/SharedWorkerRepositoryClientImpl.h" |
| @@ -478,10 +479,32 @@ NavigationPolicy FrameLoaderClientImpl::decidePolicyForNavigation(const Resource |
| return static_cast<NavigationPolicy>(webPolicy); |
| } |
| -void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const String& allowedDestinationOrigin, const String& selector, const String& markup) |
| + |
| +struct TransitionElementData { |
|
Nate Chapin
2014/11/05 18:29:43
I don't see any uses of this struct.
Zhen Wang
2014/11/06 17:59:26
See the changes in Document.cpp.
Nate Chapin
2014/11/11 00:28:17
It's defined in Document.h, why the redefinition h
Zhen Wang
2014/11/11 15:12:20
Oh. My mistake. Fixed.
|
| + String scope; |
| + String selector; |
| + String markup; |
| + Vector<String> names; |
| + Vector<IntRect> rects; |
| +}; |
| + |
| +void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const Document::TransitionElementData& data) |
| { |
| - if (m_webFrame->client()) |
| - m_webFrame->client()->addNavigationTransitionData(allowedDestinationOrigin, selector, markup); |
| + if (m_webFrame->client()) { |
|
Nate Chapin
2014/11/05 18:29:43
Early exit if m_webFrame->client() is null, rather
Zhen Wang
2014/11/06 17:59:26
Done.
|
| + // TODO(zhenw): change to use WebTransitionElementData after the chrome side is done. |
|
Nate Chapin
2014/11/05 18:29:43
blink uses FIXME: instead of TODO(name):
Zhen Wang
2014/11/06 17:59:26
Done.
|
| + Vector<String> names; |
| + Vector<IntRect> rects; |
| + for (size_t i = 0; i < data.elements.size(); ++i) { |
| + names.append(data.elements[i].name); |
| + rects.append(data.elements[i].rect); |
| + } |
| + m_webFrame->client()->addNavigationTransitionData( |
| + WebString(data.scope), |
| + WebString(data.selector), |
| + WebString(data.markup), |
| + WebVector<WebString>(names), |
| + WebVector<WebRect>(rects)); |
| + } |
| } |
| void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request) |