Molybden API
Loading...
Searching...
No Matches
molybden::BrowserSettings Class Referenceabstract

Public Member Functions

virtual std::shared_ptr< Browserbrowser ()=0
 Returns the browser instance configured by this settings.
 
virtual std::string defaultEncoding ()=0
 Returns a string that represents the default text encoding.
 
virtual void setDefaultEncoding (const std::string &encoding)=0
 Updates the default text encoding with the given value.
 
virtual Color defaultBackgroundColor ()=0
 Returns the default background color of the web pages loaded in the browser instance associated with these settings.
 
virtual void setDefaultBackgroundColor (const Color &color)=0
 Sets the default background color of the web pages loaded in the browser instance associated with these settings.
 
virtual bool isJavaScriptEnabled ()=0
 Indicates if JavaScript on the web pages loaded in the browser is enabled.
 
virtual void enableJavaScript ()=0
 Enables JavaScript on the web pages loaded in the browser.
 
virtual void disableJavaScript ()=0
 Disables JavaScript on the web pages loaded in the browser.
 
virtual bool isAllowLoadingImagesAutomatically ()=0
 Indicates whether images are allowed to be loaded automatically on the web pages loaded in the browser.
 
virtual void allowLoadingImagesAutomatically ()=0
 Allows loading images automatically on the web pages loaded in the browser.
 
virtual void disallowLoadingImagesAutomatically ()=0
 Disallows loading images automatically on the web pages loaded in the browser.
 
virtual bool isImagesAllowed ()=0
 Indicates whether images are displayed on the web pages loaded in the browser.
 
virtual void allowImages ()=0
 Enables images displaying on the web pages loaded in the browser.
 
virtual void disallowImages ()=0
 Disables images displaying on the web pages loaded in the browser.
 
virtual bool isPluginsEnabled ()=0
 Indicates whether plugins are enabled on the web pages loaded in the browser.
 
virtual void enablePlugins ()=0
 Enables all plugins on the web pages loaded in the browser.
 
virtual void disablePlugins ()=0
 Disables all plugins on the web pages loaded in the browser.
 
virtual bool isAllowScriptsToCloseWindows ()=0
 Indicates whether JavaScript code on the web pages loaded in the browser can close the browser.
 
virtual void allowScriptsToCloseWindows ()=0
 Allows JavaScript code on the web pages loaded in the browser to close the browser.
 
virtual void disallowScriptsToCloseWindows ()=0
 Allows JavaScript code on the web pages loaded in the browser to close the browser.
 
virtual bool isAllowJavaScriptAccessClipboard ()=0
 Indicates whether JavaScript code on the web pages loaded in the browser can access clipboard.
 
virtual void allowJavaScriptAccessClipboard ()=0
 Allows JavaScript code on the web pages loaded in the browser to access clipboard.
 
virtual void disallowJavaScriptAccessClipboard ()=0
 Disallows JavaScript code on the web pages loaded in the browser to access clipboard.
 
virtual bool isLocalStorageEnabled ()=0
 Indicates whether the local storage in the browser is enabled.
 
virtual void enableLocalStorage ()=0
 Enables the local storage in the browser.
 
virtual void disableLocalStorage ()=0
 Disables the local storage in the browser.
 
virtual bool isAllowRunningInsecureContent ()=0
 Indicates whether an insecure content can run in the browser.
 
virtual void allowRunningInsecureContent ()=0
 Allows running an insecure content in the browser.
 
virtual void disallowRunningInsecureContent ()=0
 Disallows running an insecure content in the browser.
 
virtual WebRtcIpHandlingPolicy webRtcIpHandlingPolicy ()=0
 Returns the WebRTC IP handling policy for the browser.
 
virtual void setWebRtcIpHandlingPolicy (WebRtcIpHandlingPolicy policy)=0
 Updates the WebRTC IP handling policy for the browser with the given one.
 
virtual bool isScrollbarsHidden ()=0
 Indicates whether scrollbars on a web page loaded in the browser are hidden.
 
virtual void showScrollbars ()=0
 Shows the scrollbars on the web pages loaded in the browser.
 
virtual void hideScrollbars ()=0
 Hides the scrollbars on the web pages loaded in the browser.
 
virtual bool isAllowJavaScriptAccessCookies ()=0
 Indicates whether JavaScript code is allowed to read/write cookies in the browser cookies storage.
 
virtual void allowJavaScriptAccessCookies ()=0
 Allows JavaScript code on the web pages loaded in the browser to read/write cookies in the cookies storage using the document.cookie property.
 
virtual void disallowJavaScriptAccessCookies ()=0
 Disallows JavaScript code on the web pages loaded in the browser to read/write cookies in the cookies storage using the document.cookie property.
 
virtual bool isOverscrollHistoryNavigationEnabled ()=0
 Indicates whether the browser can navigate back/forward with a left/right swipe on a devices with touch screen.
 
virtual void enableOverscrollHistoryNavigation ()=0
 Allows back/forward navigation with a left/right swipe.
 
virtual void disableOverscrollHistoryNavigation ()=0
 Disallows back/forward navigation with a left/right swipe.
 
virtual uint32_t defaultFontSize ()=0
 Returns the default font size in pixels of the web content in the browser.
 
virtual void setDefaultFontSize (uint32_t font_size_in_pixels)=0
 Sets the default font size of the web content in the browser.
 

Member Function Documentation

◆ defaultBackgroundColor()

virtual Color molybden::BrowserSettings::defaultBackgroundColor ( )
pure virtual

Returns the default background color of the web pages loaded in the browser instance associated with these settings.

Initially, the default background color is white.

◆ hideScrollbars()

virtual void molybden::BrowserSettings::hideScrollbars ( )
pure virtual

Hides the scrollbars on the web pages loaded in the browser.

If the scrollbars are already hidden, then this method does nothing.

◆ isAllowJavaScriptAccessClipboard()

virtual bool molybden::BrowserSettings::isAllowJavaScriptAccessClipboard ( )
pure virtual

Indicates whether JavaScript code on the web pages loaded in the browser can access clipboard.

By default, JavaScript is not allowed to access clipboard.

◆ isAllowJavaScriptAccessCookies()

virtual bool molybden::BrowserSettings::isAllowJavaScriptAccessCookies ( )
pure virtual

Indicates whether JavaScript code is allowed to read/write cookies in the browser cookies storage.

By default, JavaScript is allowed to read/write cookies in the cookies storage using the document.cookie property.

If JavaScript is not allowed to read/write cookies then document.cookie will return an empty string, and ‘document.cookie='test-cookie=test’` will not change cookies in the cookies storage.

◆ isAllowRunningInsecureContent()

virtual bool molybden::BrowserSettings::isAllowRunningInsecureContent ( )
pure virtual

Indicates whether an insecure content can run in the browser.

By default, running insecure content is not allowed.

◆ isAllowScriptsToCloseWindows()

virtual bool molybden::BrowserSettings::isAllowScriptsToCloseWindows ( )
pure virtual

Indicates whether JavaScript code on the web pages loaded in the browser can close the browser.

By default, JavaScript is not allowed to close the browser.

◆ isLocalStorageEnabled()

virtual bool molybden::BrowserSettings::isLocalStorageEnabled ( )
pure virtual

Indicates whether the local storage in the browser is enabled.

By default, the local storage is enabled.

◆ isOverscrollHistoryNavigationEnabled()

virtual bool molybden::BrowserSettings::isOverscrollHistoryNavigationEnabled ( )
pure virtual

Indicates whether the browser can navigate back/forward with a left/right swipe on a devices with touch screen.

By default, the overscroll navigation is disabled.

◆ isScrollbarsHidden()

virtual bool molybden::BrowserSettings::isScrollbarsHidden ( )
pure virtual

Indicates whether scrollbars on a web page loaded in the browser are hidden.

By default, the scrollbars are shown.

◆ setDefaultBackgroundColor()

virtual void molybden::BrowserSettings::setDefaultBackgroundColor ( const Color color)
pure virtual

Sets the default background color of the web pages loaded in the browser instance associated with these settings.

This color will be used as a default background color when Chromium cannot identify the background color. This may happen if the page is not fully loaded, or the page does not explicitly override the default background.

If a web page is already loaded, its default background color will be updated and an asynchronous request to repaint the web page will be sent.

Parameters
colorthe new default background color.

◆ setDefaultEncoding()

virtual void molybden::BrowserSettings::setDefaultEncoding ( const std::string &  encoding)
pure virtual

Updates the default text encoding with the given value.

Parameters
encodinga string that represents the new default text encoding.

◆ setDefaultFontSize()

virtual void molybden::BrowserSettings::setDefaultFontSize ( uint32_t  font_size_in_pixels)
pure virtual

Sets the default font size of the web content in the browser.

Also, updates the default fixed-width font size and sets its value less by 3 than the given font_size_in_pixels.

Parameters
font_size_in_pixelsthe font size to set as default. Must not be less than 9.

◆ setWebRtcIpHandlingPolicy()

virtual void molybden::BrowserSettings::setWebRtcIpHandlingPolicy ( WebRtcIpHandlingPolicy  policy)
pure virtual

Updates the WebRTC IP handling policy for the browser with the given one.

Parameters
policya new WebRTC IP handling policy.

◆ showScrollbars()

virtual void molybden::BrowserSettings::showScrollbars ( )
pure virtual

Shows the scrollbars on the web pages loaded in the browser.

If the scrollbars are already shown, then this method does nothing.


The documentation for this class was generated from the following file: