#ifndef CHROME_TEST_CHROMEDRIVER_CHROME_HEAP_SNAPSHOT_TAKER_H_
#define CHROME_TEST_CHROMEDRIVER_CHROME_HEAP_SNAPSHOT_TAKER_H_
#include <string>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/test/chromedriver/chrome/devtools_event_listener.h"
namespace base {
class DictionaryValue;
class Value;
}
class DevToolsClient;
class Status;
class HeapSnapshotTaker: public DevToolsEventListener {
public:
explicit HeapSnapshotTaker(DevToolsClient* client);
virtual ~HeapSnapshotTaker();
Status TakeSnapshot(scoped_ptr<base::Value>* snapshot);
virtual Status OnEvent(DevToolsClient* client,
const std::string& method,
const base::DictionaryValue& params) OVERRIDE;
private:
Status TakeSnapshotInternal();
DevToolsClient* client_;
std::string snapshot_;
DISALLOW_COPY_AND_ASSIGN(HeapSnapshotTaker);
};
#endif