5#ifndef MOLYBDEN_NAVIGATION_DELEGATES_HPP
6#define MOLYBDEN_NAVIGATION_DELEGATES_HPP
11#include "molybden/base/delegate.hpp"
12#include "molybden/base/delegate_action.hpp"
13#include "molybden/network/http_status_code.hpp"
14#include "molybden/network/network.hpp"
52 std::unique_ptr<rpc::internal::Callback> callback);
91 std::unique_ptr<rpc::internal::Callback> callback);
130 std::unique_ptr<rpc::internal::Callback> callback);
The base API that implements classes which represent delegate's action.
Definition delegate_action.hpp:18
Delegates allow you to make decisions that affect the application behavior.
Definition delegate.hpp:30
Objects implement this interface to get notified about changes in Navigation and to provide necessary...
Definition navigation_delegates.hpp:148
Delegate< StartNavigationArgs, StartNavigationAction > onStartNavigation
Invoked when navigation to a resource is about to start.
Definition navigation_delegates.hpp:166
Delegate< ShowHttpErrorPageArgs, ShowHttpErrorPageAction > onShowHttpErrorPage
Invoked when a network error web page is about to display, because the web server sends an empty HTTP...
Definition navigation_delegates.hpp:191
Delegate< ShowNetErrorPageArgs, ShowNetErrorPageAction > onShowNetErrorPage
Invoked when a network error web page is about to display, because the required web resource cannot b...
Definition navigation_delegates.hpp:215
The NavigationDelegates::onShowHttpErrorPage action.
Definition navigation_delegates.hpp:88
void showPage(const std::string &html)
Tells the browser to display a custom error page with the given HTML.
void showDefaultPage()
Tells the browser that it should display the default error page.
The NavigationDelegates::onShowNetErrorPage action.
Definition navigation_delegates.hpp:127
void showDefaultPage()
Tells the browser to show the default network error page.
void showPage(const std::string &html)
Tells the browser to display a custom network error page with the given HTML.
The NavigationDelegates::onStartNavigation action.
Definition navigation_delegates.hpp:49
void start()
Tells the browser that it should continue the navigation request.
void ignore()
Tells the browser that the navigation request should be ignored.
The NavigationDelegates::onShowHttpErrorPage action arguments.
Definition navigation_delegates.hpp:68
HttpStatusCode http_status_code
The error code of the failed request.
Definition navigation_delegates.hpp:82
std::shared_ptr< Navigation > navigation
The navigation instance initiated this action.
Definition navigation_delegates.hpp:72
std::string url
The URL of the unreachable navigation request.
Definition navigation_delegates.hpp:77
The NavigationDelegates::onShowNetErrorPage action arguments.
Definition navigation_delegates.hpp:107
std::string url
The URL of the unreachable navigation request.
Definition navigation_delegates.hpp:116
std::shared_ptr< Navigation > navigation
The navigation instance initiated this action.
Definition navigation_delegates.hpp:111
NetError error
The network error of the failed navigation request.
Definition navigation_delegates.hpp:121
The NavigationDelegates::onStartNavigation action arguments.
Definition navigation_delegates.hpp:23
std::string url
The navigation request URL.
Definition navigation_delegates.hpp:32
bool is_redirect
Indicates if the request is the result of redirection caused by another request.
Definition navigation_delegates.hpp:38
bool is_main_frame
Indicates if the navigation request URL belongs to the main frame.
Definition navigation_delegates.hpp:43
std::shared_ptr< Navigation > navigation
The navigation instance initiated this action.
Definition navigation_delegates.hpp:27