Molybden API
Loading...
Searching...
No Matches
browser_settings.hpp
1// Copyright (c) 2000-2024 TeamDev. All rights reserved.
2// TeamDev PROPRIETARY and CONFIDENTIAL.
3// Use is subject to license terms.
4
5#ifndef MOLYBDEN_BROWSER_SETTINGS_HPP
6#define MOLYBDEN_BROWSER_SETTINGS_HPP
7
8#include "molybden/ui/color.hpp"
9
10namespace molybden {
11
12class Browser;
13
18enum class WebRtcIpHandlingPolicy {
19 kUnspecified,
20
27 kDefault,
28
34 kDefaultPublicInterfacesOnly,
35
42 kDefaultPublicAndPrivateInterfaces,
43
50 kDisableNonProxiedUdp,
51};
52
54 public:
55 virtual ~BrowserSettings() = default;
56
60 virtual std::shared_ptr<Browser> browser() = 0;
61
65 virtual std::string defaultEncoding() = 0;
66
72 virtual void setDefaultEncoding(const std::string& encoding) = 0;
73
81
96 virtual void setDefaultBackgroundColor(const Color& color) = 0;
97
101 virtual bool isJavaScriptEnabled() = 0;
102
106 virtual void enableJavaScript() = 0;
107
111 virtual void disableJavaScript() = 0;
112
118
124
130
135 virtual bool isImagesAllowed() = 0;
136
140 virtual void allowImages() = 0;
141
145 virtual void disallowImages() = 0;
146
151 virtual bool isPluginsEnabled() = 0;
152
156 virtual void enablePlugins() = 0;
157
161 virtual void disablePlugins() = 0;
162
170
175 virtual void allowScriptsToCloseWindows() = 0;
176
182
190
196
202
208 virtual bool isLocalStorageEnabled() = 0;
209
213 virtual void enableLocalStorage() = 0;
214
218 virtual void disableLocalStorage() = 0;
219
226
230 virtual void allowRunningInsecureContent() = 0;
231
236
240 virtual WebRtcIpHandlingPolicy webRtcIpHandlingPolicy() = 0;
241
247 virtual void setWebRtcIpHandlingPolicy(WebRtcIpHandlingPolicy policy) = 0;
248
255 virtual bool isScrollbarsHidden() = 0;
256
262 virtual void showScrollbars() = 0;
263
269 virtual void hideScrollbars() = 0;
270
283
290
297
304
309
314
318 virtual uint32_t defaultFontSize() = 0;
319
329 virtual void setDefaultFontSize(uint32_t font_size_in_pixels) = 0;
330};
331
332} // namespace molybden
333
334#endif // MOLYBDEN_BROWSER_SETTINGS_HPP
Definition browser_settings.hpp:53
virtual void setDefaultFontSize(uint32_t font_size_in_pixels)=0
Sets the default font size of the web content in the browser.
virtual void setDefaultBackgroundColor(const Color &color)=0
Sets the default background color of the web pages loaded in the browser instance associated with the...
virtual std::string defaultEncoding()=0
Returns a string that represents the default text encoding.
virtual void disallowLoadingImagesAutomatically()=0
Disallows loading images automatically on the web pages loaded in the browser.
virtual void allowImages()=0
Enables images displaying 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 enableOverscrollHistoryNavigation()=0
Allows back/forward navigation with a left/right swipe.
virtual void disallowJavaScriptAccessCookies()=0
Disallows JavaScript code on the web pages loaded in the browser to read/write cookies in the cookies...
virtual bool isAllowScriptsToCloseWindows()=0
Indicates whether JavaScript code on the web pages loaded in the browser can close the browser.
virtual bool isOverscrollHistoryNavigationEnabled()=0
Indicates whether the browser can navigate back/forward with a left/right swipe on a devices with tou...
virtual bool isAllowJavaScriptAccessClipboard()=0
Indicates whether JavaScript code on the web pages loaded in the browser can access clipboard.
virtual void enablePlugins()=0
Enables all plugins 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 allowScriptsToCloseWindows()=0
Allows JavaScript code on the web pages loaded in the browser to close the browser.
virtual bool isAllowLoadingImagesAutomatically()=0
Indicates whether images are allowed to be loaded automatically on the web pages loaded in the browse...
virtual void setDefaultEncoding(const std::string &encoding)=0
Updates the default text encoding with the given value.
virtual void disallowRunningInsecureContent()=0
Disallows running an insecure content in the browser.
virtual void disableLocalStorage()=0
Disables the local storage in the browser.
virtual void allowRunningInsecureContent()=0
Allows running an insecure content in the browser.
virtual bool isAllowRunningInsecureContent()=0
Indicates whether an insecure content can run in the browser.
virtual bool isJavaScriptEnabled()=0
Indicates if JavaScript on the web pages loaded in the browser is enabled.
virtual void disablePlugins()=0
Disables all plugins on the web pages loaded in the browser.
virtual void disableJavaScript()=0
Disables JavaScript on the web pages loaded in the browser.
virtual void showScrollbars()=0
Shows the scrollbars on the web pages loaded in the browser.
virtual uint32_t defaultFontSize()=0
Returns the default font size in pixels of the web content in the browser.
virtual Color defaultBackgroundColor()=0
Returns the default background color of the web pages loaded in the browser instance associated with ...
virtual void disallowImages()=0
Disables images displaying on the web pages loaded in the browser.
virtual void disallowScriptsToCloseWindows()=0
Allows JavaScript code on the web pages loaded in the browser to close the browser.
virtual bool isLocalStorageEnabled()=0
Indicates whether the local storage in the browser is enabled.
virtual std::shared_ptr< Browser > browser()=0
Returns the browser instance configured by this settings.
virtual void enableJavaScript()=0
Enables JavaScript on the web pages loaded in the browser.
virtual void allowJavaScriptAccessCookies()=0
Allows JavaScript code on the web pages loaded in the browser to read/write cookies in the cookies st...
virtual bool isAllowJavaScriptAccessCookies()=0
Indicates whether JavaScript code is allowed to read/write cookies in the browser cookies storage.
virtual void allowJavaScriptAccessClipboard()=0
Allows JavaScript code on the web pages loaded in the browser to access clipboard.
virtual WebRtcIpHandlingPolicy webRtcIpHandlingPolicy()=0
Returns the WebRTC IP handling policy for the browser.
virtual void disallowJavaScriptAccessClipboard()=0
Disallows JavaScript code on the web pages loaded in the browser to access clipboard.
virtual void allowLoadingImagesAutomatically()=0
Allows loading images automatically 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 isScrollbarsHidden()=0
Indicates whether scrollbars on a web page loaded in the browser are hidden.
virtual void setWebRtcIpHandlingPolicy(WebRtcIpHandlingPolicy policy)=0
Updates the WebRTC IP handling policy for the browser with the given one.
virtual void disableOverscrollHistoryNavigation()=0
Disallows back/forward navigation with a left/right swipe.
virtual void enableLocalStorage()=0
Enables the local storage in the browser.
A numeric model of an RGB color.
Definition color.hpp:23