parameters: (self, devtools_port, remote_devtools_port, app_backend)
docstring: Creates a new DevToolsClientBackend.
  
      A DevTools agent must exist on the given devtools_port.
  
      Args:
        devtools_port: The port to use to connect to DevTools agent.
        remote_devtools_port: In some cases (e.g., app running on
            Android device, devtools_port is the forwarded port on the
            host platform. We also need to know the remote_devtools_port
            so that we can uniquely identify the DevTools agent.
        app_backend: For the app that contains the DevTools agent.
docstring_summary: Creates a new DevToolsClientBackend.
docstring_tokens: Creates a new DevToolsClientBackend .
function: def __init__(self, devtools_port, remote_devtools_port, app_backend):
      """Creates a new DevToolsClientBackend.
  
      A DevTools agent must exist on the given devtools_port.
  
      Args:
        devtools_port: The port to use to connect to DevTools agent.
        remote_devtools_port: In some cases (e.g., app running on
            Android device, devtools_port is the forwarded port on the
            host platform. We also need to know the remote_devtools_port
            so that we can uniquely identify the DevTools agent.
        app_backend: For the app that contains the DevTools agent.
      """
      self._devtools_port = devtools_port
      self._remote_devtools_port = remote_devtools_port
      self._devtools_http = devtools_http.DevToolsHttp(devtools_port)
      self._browser_inspector_websocket = None
      self._tracing_backend = None
      self._memory_backend = None
      self._app_backend = app_backend
      self._devtools_context_map_backend = _DevToolsContextMapBackend(
          self._app_backend, self)
  
      self._tab_ids = None
  
      if not self.supports_tracing:
        return
      chrome_tracing_devtools_manager.RegisterDevToolsClient(
          self, self._app_backend.platform_backend)
  
      # Telemetry has started Chrome tracing if there is trace config, so start
      # tracing on this newly created devtools client if needed.
      trace_config = (self._app_backend.platform_backend
                      .tracing_controller_backend.GetChromeTraceConfig())
      if not trace_config:
        self._CreateTracingBackendIfNeeded(is_tracing_running=False)
        return
  
      if self.support_startup_tracing:
        self._CreateTracingBackendIfNeeded(is_tracing_running=True)
        return
  
      self._CreateTracingBackendIfNeeded(is_tracing_running=False)
      self.StartChromeTracing(trace_config)
function_tokens: def __init__ ( self , devtools_port , remote_devtools_port , app_backend ) : self . _devtools_port = devtools_port self . _remote_devtools_port = remote_devtools_port self . _devtools_http = devtools_http . DevToolsHttp ( devtools_port ) self . _browser_inspector_websocket = None self . _tracing_backend = None self . _memory_backend = None self . _app_backend = app_backend self . _devtools_context_map_backend = _DevToolsContextMapBackend ( self . _app_backend , self ) self . _tab_ids = None if not self . supports_tracing : return chrome_tracing_devtools_manager . RegisterDevToolsClient ( self , self . _app_backend . platform_backend ) # Telemetry has started Chrome tracing if there is trace config, so start # tracing on this newly created devtools client if needed. trace_config = ( self . _app_backend . platform_backend . tracing_controller_backend . GetChromeTraceConfig ( ) ) if not trace_config : self . _CreateTracingBackendIfNeeded ( is_tracing_running = False ) return if self . support_startup_tracing : self . _CreateTracingBackendIfNeeded ( is_tracing_running = True ) return self . _CreateTracingBackendIfNeeded ( is_tracing_running = False ) self . StartChromeTracing ( trace_config )