NavigationAction.h [plain text]
#ifndef NavigationAction_h
#define NavigationAction_h
#include "Event.h"
#include "FrameLoaderTypes.h"
#include "URL.h"
#include "ResourceRequest.h"
#include <wtf/Forward.h>
namespace WebCore {
class NavigationAction {
public:
WEBCORE_EXPORT NavigationAction();
WEBCORE_EXPORT explicit NavigationAction(const ResourceRequest&);
WEBCORE_EXPORT NavigationAction(const ResourceRequest&, NavigationType);
WEBCORE_EXPORT NavigationAction(const ResourceRequest&, FrameLoadType, bool isFormSubmission);
NavigationAction(const ResourceRequest&, ShouldOpenExternalURLsPolicy);
NavigationAction(const ResourceRequest&, NavigationType, Event*);
NavigationAction(const ResourceRequest&, NavigationType, Event*, ShouldOpenExternalURLsPolicy);
NavigationAction(const ResourceRequest&, NavigationType, ShouldOpenExternalURLsPolicy);
NavigationAction(const ResourceRequest&, FrameLoadType, bool isFormSubmission, Event*);
NavigationAction(const ResourceRequest&, FrameLoadType, bool isFormSubmission, Event*, ShouldOpenExternalURLsPolicy);
NavigationAction copyWithShouldOpenExternalURLsPolicy(ShouldOpenExternalURLsPolicy) const;
bool isEmpty() const { return m_resourceRequest.url().isEmpty(); }
URL url() const { return m_resourceRequest.url(); }
const ResourceRequest& resourceRequest() const { return m_resourceRequest; }
NavigationType type() const { return m_type; }
const Event* event() const { return m_event.get(); }
bool processingUserGesture() const { return m_processingUserGesture; }
ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy() const { return m_shouldOpenExternalURLsPolicy; }
private:
ResourceRequest m_resourceRequest;
NavigationType m_type;
RefPtr<Event> m_event;
bool m_processingUserGesture;
ShouldOpenExternalURLsPolicy m_shouldOpenExternalURLsPolicy;
};
}
#endif