root/chrome/test/chromedriver/chrome/debugger_tracker.cc

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

DEFINITIONS

This source file includes following definitions.
  1. OnEvent

// Copyright (c) 2013 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.

#include "chrome/test/chromedriver/chrome/debugger_tracker.h"

#include "base/strings/stringprintf.h"
#include "base/values.h"
#include "chrome/test/chromedriver/chrome/devtools_client.h"
#include "chrome/test/chromedriver/chrome/status.h"

DebuggerTracker::DebuggerTracker(DevToolsClient* client) {
  client->AddListener(this);
}

DebuggerTracker::~DebuggerTracker() {}

Status DebuggerTracker::OnEvent(DevToolsClient* client,
                         const std::string& method,
                         const base::DictionaryValue& params) {
  if (method == "Debugger.paused") {
    base::DictionaryValue empty_params;
    return client->SendCommand("Debugger.resume", empty_params);
  }
  return Status(kOk);
}

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