| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 package org.chromium.mojo.application; | |
| 6 | |
| 7 import org.chromium.mojom.mojo.Shell; | |
| 8 | |
| 9 /** | |
| 10 * Applications should implement this interface to control various behaviors of
Mojo application | |
| 11 * interface. | |
| 12 */ | |
| 13 public interface ApplicationDelegate { | |
| 14 /** | |
| 15 * Called exactly once before any other method. | |
| 16 * | |
| 17 * @param shell A handle to the shell interface. | |
| 18 * @param args Arguments used for this application. | |
| 19 * @param url URL of this application. | |
| 20 */ | |
| 21 public void initialize(Shell shell, String[] args, String url); | |
| 22 | |
| 23 /** | |
| 24 * This method is used to configure what services a connection supports when
being connected to. | |
| 25 * Return false to reject the connection entirely. | |
| 26 * | |
| 27 * @param connection A handle to the connection. | |
| 28 * @return If this application accepts any incoming connection. | |
| 29 */ | |
| 30 public boolean configureIncomingConnection(ApplicationConnection connection)
; | |
| 31 | |
| 32 /** | |
| 33 * Called before exiting. After returning from this call, the delegate canno
t expect RunLoop to | |
| 34 * still be running. | |
| 35 */ | |
| 36 public void quit(); | |
| 37 } | |
| OLD | NEW |