Molybden API
|
Allows loading resources in the browser and working with the navigation history. More...
#include <navigation.hpp>
Public Member Functions | |
virtual std::shared_ptr< Browser > | browser ()=0 |
The browser instance of this navigation. | |
virtual void | loadUrl (const std::string &url)=0 |
Starts a navigation to the resource identified by the given url . | |
virtual void | loadUrl (const std::string &url, const LoadUrlOptions &options)=0 |
Starts a navigation to the resource identified by the given url and options . | |
virtual NavigationResult | loadUrlAndWait (const std::string &url)=0 |
Starts a navigation to the resource identified by the given url and blocks the current thread until the navigation is completed. | |
virtual NavigationResult | loadUrlAndWait (const std::string &url, uint64_t timeout_in_seconds)=0 |
Starts a navigation to the resource identified by the given url and blocks the current thread until the navigation is completed. | |
virtual NavigationResult | loadUrlAndWait (const std::string &url, const LoadUrlOptions &options)=0 |
Starts a navigation to the resource identified by the given options and blocks the current thread until the navigation is completed. | |
virtual NavigationResult | loadUrlAndWait (const std::string &url, const LoadUrlOptions &options, uint64_t timeout_in_seconds)=0 |
Starts a navigation to the resource identified by the given options and blocks the current thread until the navigation is completed. | |
virtual void | goBack ()=0 |
Loads the previous location in the back-forward list. | |
virtual bool | canGoBack ()=0 |
Checks if the previous location can be loaded. | |
virtual void | goForward ()=0 |
Loads the next location in the back-forward list. | |
virtual bool | canGoForward ()=0 |
Checks if the next location can be loaded. | |
virtual void | stop ()=0 |
Cancels any pending navigation or download operation and stops any dynamic page elements, such as background sounds and animations. | |
virtual void | reload ()=0 |
Reloads the currently loaded web page. | |
virtual void | reloadAndCheckForRepost ()=0 |
Reloads the currently loaded web page, but if the current web page has POST data, the user is prompted to see if they really want to reload the page. | |
virtual void | reloadIgnoringCache ()=0 |
Reloads the currently loaded web page ignoring caches. | |
virtual void | reloadIgnoringCacheAndCheckForRepost ()=0 |
Reloads the currently loaded web page ignoring caches, but if the current web page has POST data, the user is prompted to see if they really want to reload the page. | |
virtual void | goToIndex (uint32_t index)=0 |
Navigates to the navigation entry item at the given index in the back-forward list. | |
virtual uint32_t | entryCount ()=0 |
Returns the number of items in the back-forward list. | |
virtual int32_t | currentEntryIndex ()=0 |
Returns the index of the current item in the back-forward list or -1 if the list is empty. | |
virtual NavigationEntry | entryAtIndex (uint32_t index)=0 |
Returns the navigation entry item at the given index in the back-forward list. | |
virtual bool | removeEntryAtIndex (uint32_t index)=0 |
Removes the item at the given index in the back-forward list and returns true if it was removed successfully. | |
Additional Inherited Members | |
Public Attributes inherited from molybden::NavigationEvents | |
Event< NavigationStarted > | onNavigationStarted |
Invoked when a navigation has been started. | |
Event< NavigationFinished > | onNavigationFinished |
Invoked when a navigation has been finished. | |
Event< NavigationRedirected > | onNavigationRedirected |
Invoked when a navigation has encountered a server redirect. | |
Event< NavigationStopped > | onNavigationStopped |
Invoked when a navigation has been stopped. | |
Event< LoadProgressChanged > | onLoadProgressChanged |
Invoked when the web page loading progress has been changed. | |
Event< FrameLoadFailed > | onFrameLoadFailed |
Invoked when the frame load has been failed. | |
Event< FrameLoadFinished > | onFrameLoadFinished |
Invoked when the frame load has been finished. | |
Event< FrameDocumentLoadFinished > | onFrameDocumentLoadFinished |
Invoked when the frame document load has been finished. | |
Event< LoadStarted > | onLoadStarted |
Invoked when the load has been started. | |
Event< LoadFinished > | onLoadFinished |
Invoked when the load has been finished. | |
Public Attributes inherited from molybden::NavigationDelegates | |
Delegate< StartNavigationArgs, StartNavigationAction > | onStartNavigation |
Invoked when navigation to a resource is about to start. | |
Delegate< ShowHttpErrorPageArgs, ShowHttpErrorPageAction > | onShowHttpErrorPage |
Invoked when a network error web page is about to display, because the web server sends an empty HTTP response with the HTTP status code that represents an error. | |
Delegate< ShowNetErrorPageArgs, ShowNetErrorPageAction > | onShowNetErrorPage |
Invoked when a network error web page is about to display, because the required web resource cannot be loaded because of a network error. | |
Allows loading resources in the browser and working with the navigation history.
|
pure virtual |
Returns the navigation entry item at the given index
in the back-forward list.
index | the position of the item in the back-forward list. |
|
pure virtual |
Loads the previous location in the back-forward list.
It does nothing if there is no previous location in the list.
|
pure virtual |
Loads the next location in the back-forward list.
It does nothing if there is no next location in the list.
|
pure virtual |
Navigates to the navigation entry item at the given index
in the back-forward list.
index | the position of the item in the back-forward list. |
|
pure virtual |
Starts a navigation to the resource identified by the given url
.
Tells browser to start asynchronous loading and returns immediately. There is no guarantee that the resource will be loaded completely, by the time this method returns. If there is a pending navigation, it will be stopped/canceled.
url | the URL of the resource to load. It can be the URL of a web page (e.g. https://teamdev.com/molybden) or absolute path to a local file (e.g. file:///Users/me/index.html) |
|
pure virtual |
Starts a navigation to the resource identified by the given url
and options
.
Tells the browser to start asynchronous loading and returns immediately. There is no guarantee that the resource will be loaded completely by the time this method returns. If there is a pending navigation, it will be stopped/canceled.
url | the URL of the resource to load. It can be the URL of a web page (e.g. https://teamdev.com/molybden) or absolute path to a local file (e.g. file:///Users/me/index.html) |
options | the options such as upload data and extra HTTP headers. |
|
pure virtual |
Starts a navigation to the resource identified by the given url
and blocks the current thread until the navigation is completed.
If the navigation does not complete within the kDefaultNavigationTimeoutInSeconds
, this method returns false.
This method is equivalent of loadUrlAndWait(url,
kDefaultNavigationTimeoutInSeconds)
.
url | the URL of the resource to load. It can be the URL of a web page (e.g. https://teamdev.com/molybden) or absolute path to a local file (e.g. file:///Users/me/index.html) |
|
pure virtual |
Starts a navigation to the resource identified by the given options
and blocks the current thread until the navigation is completed.
If the navigation does not complete within the kDefaultNavigationTimeoutInSeconds
, this method returns false.
This method is equivalent of loadUrlAndWait(options,
kDefaultNavigationTimeoutInSeconds)
.
url | the URL of the resource to load. It can be the URL of a web page (e.g. https://teamdev.com/molybden) or absolute path to a local file (e.g. file:///Users/me/index.html) |
options | the options such as upload data and extra HTTP headers. |
|
pure virtual |
Starts a navigation to the resource identified by the given options
and blocks the current thread until the navigation is completed.
url | the URL of the resource to load. It can be the URL of a web page (e.g. https://teamdev.com/molybden) or absolute path to a local file (e.g. file:///Users/me/index.html) |
options | the options such as upload data and extra HTTP headers. |
timeout_in_seconds | the timeout in seconds for the browser to wait until the navigation is completed. If the navigation does not complete within the given timeout, this method returns false. |
|
pure virtual |
Starts a navigation to the resource identified by the given url
and blocks the current thread until the navigation is completed.
url | the URL of the resource to load. It can be the URL of a web page (e.g. https://teamdev.com/molybden) or absolute path to a local file (e.g. file:///Users/me/index.html) |
timeout_in_seconds | the timeout in seconds for the browser to wait until the navigation is completed. If the navigation does not complete within the timeout, this method returns false. |
|
pure virtual |
Removes the item at the given index
in the back-forward list and returns true
if it was removed successfully.
index | the position of the item to remove in the back-forward list. |
true
if the item was removed successfully.