16e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 26e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 36e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)// found in the LICENSE file. 46e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) 56e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)package org.chromium.content_public.browser; 66e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) 76e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)/** 86e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * An interface that allows the embedder to be notified of navigation transition 96e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * related events and respond to them. 106e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) */ 116e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)public interface NavigationTransitionDelegate { 126e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) /** 136e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * Called when the navigation is deferred immediately after the response started. 146e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * @param markup The markup coming as part of response. 156e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * @param cssSelector The CSS selectors, which is to be applied to transition layer's 166e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * makrup. 176e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * @param enteringColor The background color of the entering document, as a String 186e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * representing a legal CSS color value. This is inserted into 196e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * the transition layer's markup after the entering stylesheets 206e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * have been applied. 216e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) */ 226e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) public void didDeferAfterResponseStarted( 236e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) String markup, String cssSelector, String enteringColor); 246e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) 256e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) /** 266e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * Called when a navigation transition has been detected, and we need to check 276e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * if it's supported. 286e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) */ 296e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) public boolean willHandleDeferAfterResponseStarted(); 306e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) 316e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) /** 326e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * Called when the navigation is deferred immediately after the response 336e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * started. 346e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) */ 356e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) public void addEnteringStylesheetToTransition(String stylesheet); 366e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) 376e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) /** 386e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * Notifies that a navigation transition is started for a given frame. 396e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) * @param frameId A positive, non-zero integer identifying the navigating frame. 406e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) */ 416e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) public void didStartNavigationTransitionForFrame(long frameId); 426e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles)} 43