| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2009 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.sdk; | |
| 6 | |
| 7 import java.net.SocketAddress; | |
| 8 import java.util.logging.Logger; | |
| 9 | |
| 10 import org.chromium.sdk.internal.BrowserFactoryImpl; | |
| 11 | |
| 12 /** | |
| 13 * A factory for Browser instances. | |
| 14 * TODO: reflect that it only creates standalone client, no browser. | |
| 15 */ | |
| 16 public abstract class BrowserFactory { | |
| 17 /** | |
| 18 * Gets a {@link BrowserFactory} instance. This method should be overridden by | |
| 19 * implementations that want to construct other implementations of | |
| 20 * {@link Browser}. | |
| 21 * | |
| 22 * @return a BrowserFactory singleton instance | |
| 23 */ | |
| 24 public static BrowserFactory getInstance() { | |
| 25 return BrowserFactoryImpl.INSTANCE; | |
| 26 } | |
| 27 | |
| 28 /** | |
| 29 * Constructs StandaloneVm instance that talks to a V8 JavaScript VM via | |
| 30 * DebuggerAgent opened at {@code socketAddress}. | |
| 31 * @param socketAddress V8 DebuggerAgent is listening on | |
| 32 * @param connectionLogger provides facility for listening to network | |
| 33 * traffic; may be null | |
| 34 */ | |
| 35 public abstract StandaloneVm createStandalone(SocketAddress socketAddress, | |
| 36 ConnectionLogger connectionLogger); | |
| 37 | |
| 38 /** | |
| 39 * @return SDK root logger that can be used to add handlers or to adjust log l
evel | |
| 40 */ | |
| 41 public static Logger getRootLogger() { | |
| 42 return LOGGER; | |
| 43 } | |
| 44 | |
| 45 private static final Logger LOGGER = Logger.getLogger("org.chromium.sdk"); | |
| 46 } | |
| OLD | NEW |