root/chrome/android/java/src/org/chromium/chrome/browser/DevToolsServer.java

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. destroy
  2. isRemoteDebuggingEnabled
  3. setRemoteDebuggingEnabled
  4. nativeInitRemoteDebugging
  5. nativeDestroyRemoteDebugging
  6. nativeIsRemoteDebuggingEnabled
  7. nativeSetRemoteDebuggingEnabled

// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.chrome.browser;

/**
 * Controller for Remote Web Debugging (Developer Tools).
 */
public class DevToolsServer {

    private long mNativeDevToolsServer = 0;

    public DevToolsServer(String socketNamePrefix) {
        mNativeDevToolsServer = nativeInitRemoteDebugging(socketNamePrefix);
    }

    public void destroy() {
        nativeDestroyRemoteDebugging(mNativeDevToolsServer);
        mNativeDevToolsServer = 0;
    }

    public boolean isRemoteDebuggingEnabled() {
        return nativeIsRemoteDebuggingEnabled(mNativeDevToolsServer);
    }

    public void setRemoteDebuggingEnabled(boolean enabled) {
        nativeSetRemoteDebuggingEnabled(mNativeDevToolsServer, enabled);
    }

    private native long nativeInitRemoteDebugging(String socketNamePrefix);
    private native void nativeDestroyRemoteDebugging(long devToolsServer);
    private native boolean nativeIsRemoteDebuggingEnabled(long devToolsServer);
    private native void nativeSetRemoteDebuggingEnabled(long devToolsServer, boolean enabled);
}

/* [<][>][^][v][top][bottom][index][help] */