2
|
1 |
// Copyright 2009 Google Inc. All Rights Reserved.
|
|
2 |
|
|
3 |
package org.chromium.debug.ui.launcher;
|
|
4 |
|
|
5 |
import org.chromium.debug.core.model.JavascriptVmEmbedder;
|
|
6 |
import org.chromium.debug.core.model.JavascriptVmEmbedderFactory;
|
|
7 |
import org.chromium.debug.core.model.NamedConnectionLoggerFactory;
|
|
8 |
import org.chromium.sdk.ConnectionLogger;
|
|
9 |
import org.eclipse.debug.core.ILaunch;
|
|
10 |
|
|
11 |
public class StandaloneV8LaunchType extends LaunchTypeBase {
|
|
12 |
@Override
|
|
13 |
protected JavascriptVmEmbedder.ConnectionToRemote createConnectionToRemote(int port,
|
|
14 |
final ILaunch launch, boolean addConsoleLogger) {
|
|
15 |
NamedConnectionLoggerFactory consoleFactory;
|
|
16 |
if (addConsoleLogger) {
|
|
17 |
consoleFactory = new NamedConnectionLoggerFactory() {
|
|
18 |
public ConnectionLogger createLogger(String title) {
|
|
19 |
return LaunchTypeBase.createConsoleAndLogger(launch, false, title);
|
|
20 |
}
|
|
21 |
};
|
|
22 |
} else {
|
|
23 |
consoleFactory = NO_CONNECTION_LOGGER_FACTORY;
|
|
24 |
}
|
|
25 |
return JavascriptVmEmbedderFactory.connectToStandalone(port, consoleFactory);
|
|
26 |
}
|
|
27 |
} |