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

Unified Diff: public/web/WebFrameClient.h

Issue 319573008: Navigation transitions: Initiate navigation transition and send serialized markup to Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@transitions_editing
Patch Set: Rebase Created 6 years, 5 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 | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebFrameClient.h
diff --git a/public/web/WebFrameClient.h b/public/web/WebFrameClient.h
index 0c570f530b590dbb6643901f7f7377b2c8812d14..11de357728a7459dcfe61aee2982d686cdda4da0 100644
--- a/public/web/WebFrameClient.h
+++ b/public/web/WebFrameClient.h
@@ -183,6 +183,32 @@ public:
// The client may choose to alter the navigation policy. Otherwise,
// defaultPolicy should just be returned.
+
+ struct NavigationPolicyInfo {
+ WebLocalFrame* frame;
+ WebDataSource::ExtraData* extraData;
+ const WebURLRequest& urlRequest;
+ WebNavigationType navigationType;
+ WebNavigationPolicy defaultPolicy;
+ bool isRedirect;
+ bool isTransitionNavigation;
+
+ NavigationPolicyInfo(const WebURLRequest& urlRequest)
+ : frame(0)
+ , extraData(0)
+ , urlRequest(urlRequest)
+ , navigationType(WebNavigationTypeOther)
+ , defaultPolicy(WebNavigationPolicyIgnore)
+ , isRedirect(false)
+ , isTransitionNavigation(false) { }
+ };
+
+ virtual WebNavigationPolicy decidePolicyForNavigation(const NavigationPolicyInfo& info)
+ {
+ return decidePolicyForNavigation(info.frame, info.extraData, info.urlRequest, info.navigationType, info.defaultPolicy, info.isRedirect);
+ }
+
+ // DEPRECATED
virtual WebNavigationPolicy decidePolicyForNavigation(
WebLocalFrame*, WebDataSource::ExtraData*, const WebURLRequest&, WebNavigationType,
WebNavigationPolicy defaultPolicy, bool isRedirect) { return defaultPolicy; }
@@ -215,6 +241,8 @@ public:
virtual void didCreateDataSource(WebLocalFrame*, WebDataSource*) { }
// A new provisional load has been started.
+ virtual void didStartProvisionalLoad(WebLocalFrame* localFrame, bool isTransitionNavigation) { didStartProvisionalLoad(localFrame); }
+ // DEPRECATED
virtual void didStartProvisionalLoad(WebLocalFrame*) { }
// The provisional load was redirected via a HTTP 3xx response.
@@ -274,6 +302,12 @@ public:
virtual void didChangeThemeColor() { }
+ // Transition navigations -----------------------------------------------
+
+ // Provides serialized markup of transition elements for use in the following navigation.
+ virtual void addNavigationTransitionData(const WebString& allowedDestinationOrigin, const WebString& selector, const WebString& markup) { }
+
+
// Web Notifications ---------------------------------------------------
// Requests permission to display platform notifications on the origin of this frame.
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698