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

Unified Diff: Source/web/FrameLoaderClientImpl.cpp

Issue 654953002: Navigation transitions (web to native app): Get names and rects of transition elements (Step 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review fix Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/FrameLoaderClientImpl.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/FrameLoaderClientImpl.cpp
diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp
index 6c140aa0bd0ff00c4c91ee7bdf67d1302037428f..c757f3dd2726bf3466980c8a6d3cb593838c82fd 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,24 @@ NavigationPolicy FrameLoaderClientImpl::decidePolicyForNavigation(const Resource
return static_cast<NavigationPolicy>(webPolicy);
}
-void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const String& allowedDestinationOrigin, const String& selector, const String& markup)
+void FrameLoaderClientImpl::dispatchAddNavigationTransitionData(const Document::TransitionElementData& data)
{
- if (m_webFrame->client())
- m_webFrame->client()->addNavigationTransitionData(allowedDestinationOrigin, selector, markup);
+ if (!m_webFrame->client())
+ return;
+
+ // FIXME: change to use WebTransitionElementData after the chrome side is done.
+ Vector<String> ids;
+ Vector<IntRect> rects;
+ for (size_t i = 0; i < data.elements.size(); ++i) {
+ ids.append(data.elements[i].id);
+ rects.append(data.elements[i].rect);
+ }
+ m_webFrame->client()->addNavigationTransitionData(
+ WebString(data.scope),
+ WebString(data.selector),
+ WebString(data.markup),
+ WebVector<WebString>(ids),
+ WebVector<WebRect>(rects));
}
void FrameLoaderClientImpl::dispatchWillRequestResource(FetchRequest* request)
« no previous file with comments | « Source/web/FrameLoaderClientImpl.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698