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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 652283002: Navigation transitions (web to native app): Get names and rects of transition elements (Chrome side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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 | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 2b8bcf0f6e9019f91f36b77e5f9a36f3ce3f46a3..d3d389943be27212107641abd0dc98e8b345ed07 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2434,13 +2434,44 @@ void RenderFrameImpl::didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame) {
render_view_->didUpdateCurrentHistoryItem(frame);
}
+// TODO(zhenw): This will be removed once the blink side implementation is done.
void RenderFrameImpl::addNavigationTransitionData(
const blink::WebString& allowed_destination_host_pattern,
const blink::WebString& selector,
const blink::WebString& markup) {
+ std::vector<std::string> data;
+ data.push_back(allowed_destination_host_pattern.utf8());
nasko 2014/10/14 23:09:51 Do not collapse top-level parameters into a vector
Zhen Wang 2014/10/15 18:22:12 Done.
+ data.push_back(selector.utf8());
+ data.push_back(markup.utf8());
+
+ Send(new FrameHostMsg_AddNavigationTransitionData(
+ routing_id_, data, std::vector<std::string>(),
+ std::vector<gfx::Rect>()));
+}
+
+void RenderFrameImpl::addNavigationTransitionData(
+ const blink::WebString& allowed_destination_host_pattern,
+ const blink::WebString& selector,
+ const blink::WebString& markup,
+ const blink::WebVector<blink::WebString>& web_names,
+ const blink::WebVector<blink::WebRect>& web_rects) {
+ std::vector<std::string> data;
+ data.push_back(allowed_destination_host_pattern.utf8());
+ data.push_back(selector.utf8());
+ data.push_back(markup.utf8());
+
+ std::vector<std::string> names;
+ for (size_t i = 0; i < web_names.size(); i++) {
+ names.push_back(web_names[i].utf8());
+ }
+
+ std::vector<gfx::Rect> rects;
+ for (size_t i = 0; i < web_rects.size(); i++) {
+ rects.push_back(gfx::Rect(web_rects[i]));
+ }
+
Send(new FrameHostMsg_AddNavigationTransitionData(
- routing_id_, allowed_destination_host_pattern.utf8(), selector.utf8(),
- markup.utf8()));
+ routing_id_, data, names, rects));
}
void RenderFrameImpl::didChangeThemeColor() {
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698