Code example for ConcurrentLinkedQueue

0
 
import java.util.concurrent.ConcurrentLinkedQueue; 
 
class ChromeClient extends WebChromeClient {
  private final AndroidWebDriver driver;
  public static ConcurrentLinkedQueue<Alert> unhandledAlerts = new ConcurrentLinkedQueue<Alert>();
 
 
  public ChromeClient(AndroidWebDriver driver) {
    this.driver = driver;
  } 
 
  @Override 
  public void onCloseWindow(WebView window) {
    driver.getViewManager().removeView(window);
    super.onCloseWindow(window);
  } 
 
  @Override 
  public boolean onCreateWindow(WebView view, boolean dialog, boolean userGesture,
      Message resultMsg) {