| Index: remoting/android/java/src/org/chromium/chromoting/CapabilityManager.java
|
| diff --git a/remoting/android/java/src/org/chromium/chromoting/CapabilityManager.java b/remoting/android/java/src/org/chromium/chromoting/CapabilityManager.java
|
| index e332e839de8d1cccaf091c5b2d03b05d72602783..0a551bf4eb1bc9b0959d7f97f89c2e64f78d158d 100644
|
| --- a/remoting/android/java/src/org/chromium/chromoting/CapabilityManager.java
|
| +++ b/remoting/android/java/src/org/chromium/chromoting/CapabilityManager.java
|
| @@ -21,10 +21,6 @@ import java.util.List;
|
| * The CapabilityManager mirrors how the Chromoting host handles extension messages. For each
|
| * incoming extension message, runs through a list of HostExtensionSession objects, giving each one
|
| * a chance to handle the message.
|
| - *
|
| - * The CapabilityManager is a singleton class so we can manage client extensions on an application
|
| - * level. The singleton object may be used from multiple Activities, thus allowing it to support
|
| - * different capabilities at different stages of the application.
|
| */
|
| public class CapabilityManager {
|
| /** Used to allow objects to receive notifications when the host capabilites are received. */
|
| @@ -50,12 +46,6 @@ public class CapabilityManager {
|
|
|
| private static final String TAG = "Chromoting";
|
|
|
| - /** Lazily-initialized singleton object that can be used from different Activities. */
|
| - private static CapabilityManager sInstance;
|
| -
|
| - /** Protects access to |sInstance|. */
|
| - private static final Object sInstanceLock = new Object();
|
| -
|
| /** List of all capabilities that are supported by the application. */
|
| private List<String> mLocalCapabilities;
|
|
|
| @@ -68,7 +58,7 @@ public class CapabilityManager {
|
| /** Maintains a list of listeners to notify when host capabilities are received. */
|
| private List<CapabilitiesChangedListener> mCapabilitiesChangedListeners;
|
|
|
| - private CapabilityManager() {
|
| + public CapabilityManager() {
|
| mLocalCapabilities = new ArrayList<String>();
|
| mClientExtensions = new ArrayList<ClientExtension>();
|
|
|
| @@ -79,18 +69,6 @@ public class CapabilityManager {
|
| }
|
|
|
| /**
|
| - * Returns the singleton object. Thread-safe.
|
| - */
|
| - public static CapabilityManager getInstance() {
|
| - synchronized (sInstanceLock) {
|
| - if (sInstance == null) {
|
| - sInstance = new CapabilityManager();
|
| - }
|
| - return sInstance;
|
| - }
|
| - }
|
| -
|
| - /**
|
| * Cleans up host specific state when the connection has been terminated.
|
| */
|
| public void onHostDisconnect() {
|
|
|