Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- |
michael@0 | 2 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | package org.mozilla.gecko; |
michael@0 | 7 | |
michael@0 | 8 | public class GeckoViewChrome implements GeckoView.ChromeDelegate { |
michael@0 | 9 | /** |
michael@0 | 10 | * Tell the host application that Gecko is ready to handle requests. |
michael@0 | 11 | * @param view The GeckoView that initiated the callback. |
michael@0 | 12 | */ |
michael@0 | 13 | public void onReady(GeckoView view) {} |
michael@0 | 14 | |
michael@0 | 15 | /** |
michael@0 | 16 | * Tell the host application to display an alert dialog. |
michael@0 | 17 | * @param view The GeckoView that initiated the callback. |
michael@0 | 18 | * @param browser The Browser that is loading the content. |
michael@0 | 19 | * @param message The string to display in the dialog. |
michael@0 | 20 | * @param result A PromptResult used to send back the result without blocking. |
michael@0 | 21 | * Defaults to cancel requests. |
michael@0 | 22 | */ |
michael@0 | 23 | public void onAlert(GeckoView view, GeckoView.Browser browser, String message, GeckoView.PromptResult result) { |
michael@0 | 24 | result.cancel(); |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | /** |
michael@0 | 28 | * Tell the host application to display a confirmation dialog. |
michael@0 | 29 | * @param view The GeckoView that initiated the callback. |
michael@0 | 30 | * @param browser The Browser that is loading the content. |
michael@0 | 31 | * @param message The string to display in the dialog. |
michael@0 | 32 | * @param result A PromptResult used to send back the result without blocking. |
michael@0 | 33 | * Defaults to cancel requests. |
michael@0 | 34 | */ |
michael@0 | 35 | public void onConfirm(GeckoView view, GeckoView.Browser browser, String message, GeckoView.PromptResult result) { |
michael@0 | 36 | result.cancel(); |
michael@0 | 37 | } |
michael@0 | 38 | |
michael@0 | 39 | /** |
michael@0 | 40 | * Tell the host application to display an input prompt dialog. |
michael@0 | 41 | * @param view The GeckoView that initiated the callback. |
michael@0 | 42 | * @param browser The Browser that is loading the content. |
michael@0 | 43 | * @param message The string to display in the dialog. |
michael@0 | 44 | * @param defaultValue The string to use as default input. |
michael@0 | 45 | * @param result A PromptResult used to send back the result without blocking. |
michael@0 | 46 | * Defaults to cancel requests. |
michael@0 | 47 | */ |
michael@0 | 48 | public void onPrompt(GeckoView view, GeckoView.Browser browser, String message, String defaultValue, GeckoView.PromptResult result) { |
michael@0 | 49 | result.cancel(); |
michael@0 | 50 | } |
michael@0 | 51 | |
michael@0 | 52 | /** |
michael@0 | 53 | * Tell the host application to display a remote debugging request dialog. |
michael@0 | 54 | * @param view The GeckoView that initiated the callback. |
michael@0 | 55 | * @param result A PromptResult used to send back the result without blocking. |
michael@0 | 56 | * Defaults to cancel requests. |
michael@0 | 57 | */ |
michael@0 | 58 | public void onDebugRequest(GeckoView view, GeckoView.PromptResult result) { |
michael@0 | 59 | result.cancel(); |
michael@0 | 60 | } |
michael@0 | 61 | } |