#ifndef CHROME_TEST_CHROMEDRIVER_CHROME_GEOLOCATION_OVERRIDE_MANAGER_H_
#define CHROME_TEST_CHROMEDRIVER_CHROME_GEOLOCATION_OVERRIDE_MANAGER_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 DevToolsClient;
struct Geoposition;
class Status;
class GeolocationOverrideManager : public DevToolsEventListener {
public:
explicit GeolocationOverrideManager(DevToolsClient* client);
virtual ~GeolocationOverrideManager();
Status OverrideGeolocation(const Geoposition& geoposition);
virtual Status OnConnected(DevToolsClient* client) OVERRIDE;
virtual Status OnEvent(DevToolsClient* client,
const std::string& method,
const base::DictionaryValue& params) OVERRIDE;
private:
Status ApplyOverrideIfNeeded();
DevToolsClient* client_;
scoped_ptr<Geoposition> overridden_geoposition_;
DISALLOW_COPY_AND_ASSIGN(GeolocationOverrideManager);
};
#endif