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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.app.SearchManager; 9 import android.app.SearchManager;
10 import android.content.ClipboardManager; 10 import android.content.ClipboardManager;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 */ 233 */
234 public interface NavigationTransitionDelegate { 234 public interface NavigationTransitionDelegate {
235 /** 235 /**
236 * Called when the navigation is deferred immediately after the response started. 236 * Called when the navigation is deferred immediately after the response started.
237 * 237 *
238 * @param enteringColor The background color of the entering document, a s a String 238 * @param enteringColor The background color of the entering document, a s a String
239 * representing a legal CSS color value. This is in serted into 239 * representing a legal CSS color value. This is in serted into
240 * the transition layer's markup after the entering stylesheets 240 * the transition layer's markup after the entering stylesheets
241 * have been applied. 241 * have been applied.
242 */ 242 */
243 public void didDeferAfterResponseStarted(String enteringColor); 243 public void didDeferAfterResponseStarted(String markup, String cssSelect or, String enteringColor);
244 244
245 /** 245 /**
246 * Called when a navigation transition has been detected, and we need to check 246 * Called when a navigation transition has been detected, and we need to check
247 * if it's supported. 247 * if it's supported.
248 */ 248 */
249 public boolean willHandleDeferAfterResponseStarted(); 249 public boolean willHandleDeferAfterResponseStarted();
250 250
251 /** 251 /**
252 * Called when the navigation is deferred immediately after the response 252 * Called when the navigation is deferred immediately after the response
253 * started. 253 * started.
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 computeVerticalScrollOffset(), 1414 computeVerticalScrollOffset(),
1415 computeVerticalScrollExtent()); 1415 computeVerticalScrollExtent());
1416 break; 1416 break;
1417 default: 1417 default:
1418 break; 1418 break;
1419 } 1419 }
1420 } 1420 }
1421 } 1421 }
1422 1422
1423 /** 1423 /**
1424 * Inserts the provided markup sandboxed into the frame.
1425 */
1426 void setupTransitionView(String markup) {
1427 if (mNativeContentViewCore == 0) return;
1428 nativeSetupTransitionView(mNativeContentViewCore, markup);
1429 }
1430
1431 /**
1432 * Hides transition elements specified by the selector, and activates any
1433 * exiting-transition stylesheets.
1434 */
1435 void beginExitTransition(String cssSelector) {
1436 if (mNativeContentViewCore == 0) return;
1437 nativeBeginExitTransition(mNativeContentViewCore, cssSelector);
1438 }
1439
1440 /**
1424 * Requests the renderer insert a link to the specified stylesheet in the 1441 * Requests the renderer insert a link to the specified stylesheet in the
1425 * main frame's document. 1442 * main frame's document.
1426 */ 1443 */
1427 void addStyleSheetByURL(String url) { 1444 void addStyleSheetByURL(String url) {
1428 assert mWebContents != null; 1445 assert mWebContents != null;
1429 mWebContents.addStyleSheetByURL(url); 1446 mWebContents.addStyleSheetByURL(url);
1430 } 1447 }
1431 1448
1432 /** Callback interface for evaluateJavaScript(). */ 1449 /** Callback interface for evaluateJavaScript(). */
1433 public interface JavaScriptCallback { 1450 public interface JavaScriptCallback {
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
3052 mSmartClipDataListener = listener; 3069 mSmartClipDataListener = listener;
3053 } 3070 }
3054 3071
3055 public void setBackgroundOpaque(boolean opaque) { 3072 public void setBackgroundOpaque(boolean opaque) {
3056 if (mNativeContentViewCore != 0) { 3073 if (mNativeContentViewCore != 0) {
3057 nativeSetBackgroundOpaque(mNativeContentViewCore, opaque); 3074 nativeSetBackgroundOpaque(mNativeContentViewCore, opaque);
3058 } 3075 }
3059 } 3076 }
3060 3077
3061 @CalledByNative 3078 @CalledByNative
3062 private void didDeferAfterResponseStarted(String enteringColor) { 3079 private void didDeferAfterResponseStarted(String markup, String cssSelector, String enteringColor) {
3063 if (mNavigationTransitionDelegate != null ) { 3080 if (mNavigationTransitionDelegate != null ) {
3064 mNavigationTransitionDelegate.didDeferAfterResponseStarted(enteringC olor); 3081 mNavigationTransitionDelegate.didDeferAfterResponseStarted(markup, c ssSelector, enteringColor);
3065 } 3082 }
3066 } 3083 }
3067 3084
3068 @CalledByNative 3085 @CalledByNative
3069 public void didStartNavigationTransitionForFrame(long frameId) { 3086 public void didStartNavigationTransitionForFrame(long frameId) {
3070 if (mNavigationTransitionDelegate != null ) { 3087 if (mNavigationTransitionDelegate != null ) {
3071 mNavigationTransitionDelegate.didStartNavigationTransitionForFrame(f rameId); 3088 mNavigationTransitionDelegate.didStartNavigationTransitionForFrame(f rameId);
3072 } 3089 }
3073 } 3090 }
3074 3091
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
3293 long nativeContentViewCoreImpl); 3310 long nativeContentViewCoreImpl);
3294 3311
3295 private native void nativeWasResized(long nativeContentViewCoreImpl); 3312 private native void nativeWasResized(long nativeContentViewCoreImpl);
3296 3313
3297 private native void nativeSetAccessibilityEnabled( 3314 private native void nativeSetAccessibilityEnabled(
3298 long nativeContentViewCoreImpl, boolean enabled); 3315 long nativeContentViewCoreImpl, boolean enabled);
3299 3316
3300 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, 3317 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l,
3301 int x, int y, int w, int h); 3318 int x, int y, int w, int h);
3302 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); 3319 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque);
3320 private native void nativeSetupTransitionView(long nativeContentViewCoreImpl , String markup);
3321 private native void nativeBeginExitTransition(long nativeContentViewCoreImpl , String cssSelector);
3303 3322
3304 private native void nativeResumeResponseDeferredAtStart( 3323 private native void nativeResumeResponseDeferredAtStart(
3305 long nativeContentViewCoreImpl); 3324 long nativeContentViewCoreImpl);
3306 private native void nativeSetHasPendingNavigationTransitionForTesting( 3325 private native void nativeSetHasPendingNavigationTransitionForTesting(
3307 long nativeContentViewCoreImpl); 3326 long nativeContentViewCoreImpl);
3308 } 3327 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698