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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 435833002: Navigation transitions: Plumb data from the outgoing renderer to the incoming renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Testfix Created 6 years, 4 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
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 9733a58784af0c70ff24a72caa08e94a4c75e899..dd4f74dcd85663b8ce84c8bf9cc6fa548880ea90 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -240,7 +240,8 @@ public class ContentViewCore
* the transition layer's markup after the entering stylesheets
* have been applied.
*/
- public void didDeferAfterResponseStarted(String enteringColor);
+ public void didDeferAfterResponseStarted(
+ String markup, String cssSelector, String enteringColor);
/**
* Called when a navigation transition has been detected, and we need to check
@@ -1421,10 +1422,27 @@ public class ContentViewCore
}
/**
+ * Inserts the provided markup sandboxed into the frame.
+ */
+ public void setupTransitionView(String markup) {
+ if (mNativeContentViewCore == 0) return;
+ nativeSetupTransitionView(mNativeContentViewCore, markup);
+ }
+
+ /**
+ * Hides transition elements specified by the selector, and activates any
+ * exiting-transition stylesheets.
+ */
+ public void beginExitTransition(String cssSelector) {
+ if (mNativeContentViewCore == 0) return;
+ nativeBeginExitTransition(mNativeContentViewCore, cssSelector);
+ }
+
+ /**
* Requests the renderer insert a link to the specified stylesheet in the
* main frame's document.
*/
- void addStyleSheetByURL(String url) {
+ public void addStyleSheetByURL(String url) {
assert mWebContents != null;
mWebContents.addStyleSheetByURL(url);
}
@@ -3059,9 +3077,11 @@ public class ContentViewCore
}
@CalledByNative
- private void didDeferAfterResponseStarted(String enteringColor) {
+ private void didDeferAfterResponseStarted(String markup, String cssSelector,
+ String enteringColor) {
if (mNavigationTransitionDelegate != null ) {
- mNavigationTransitionDelegate.didDeferAfterResponseStarted(enteringColor);
+ mNavigationTransitionDelegate.didDeferAfterResponseStarted(markup,
+ cssSelector, enteringColor);
}
}
@@ -3300,6 +3320,9 @@ public class ContentViewCore
private native void nativeExtractSmartClipData(long nativeContentViewCoreImpl,
int x, int y, int w, int h);
private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl, boolean opaque);
+ private native void nativeSetupTransitionView(long nativeContentViewCoreImpl, String markup);
+ private native void nativeBeginExitTransition(long nativeContentViewCoreImpl,
+ String cssSelector);
private native void nativeResumeResponseDeferredAtStart(
long nativeContentViewCoreImpl);
« no previous file with comments | « content/common/frame_messages.h ('k') | content/public/android/javatests/src/org/chromium/content/browser/TransitionTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698