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 {
25 kDefault,
26
32 kDefaultPublicInterfacesOnly,
33
40 kDefaultPublicAndPrivateInterfaces,
41
48 kDisableNonProxiedUdp,
49};
50
52 public:
53 virtual ~BrowserSettings() = default;
54
58 virtual std::shared_ptr<Browser> browser() = 0;
59
63 virtual std::string defaultEncoding() = 0;
64
70 virtual void setDefaultEncoding(const std::string& encoding) = 0;
71
79
94 virtual void setDefaultBackgroundColor(const Color& color) = 0;
95
99 virtual bool isJavaScriptEnabled() = 0;
100
104 virtual void enableJavaScript() = 0;
105
109 virtual void disableJavaScript() = 0;
110
116
122
128
133 virtual bool isImagesAllowed() = 0;
134
138 virtual void allowImages() = 0;
139
143 virtual void disallowImages() = 0;
144
149 virtual bool isPluginsEnabled() = 0;
150
154 virtual void enablePlugins() = 0;
155
159 virtual void disablePlugins() = 0;
160
168
173 virtual void allowScriptsToCloseWindows() = 0;
174
180
188
194
200
206 virtual bool isLocalStorageEnabled() = 0;
207
211 virtual void enableLocalStorage() = 0;
212
216 virtual void disableLocalStorage() = 0;
217
224
228 virtual void allowRunningInsecureContent() = 0;
229
234
238 virtual WebRtcIpHandlingPolicy webRtcIpHandlingPolicy() = 0;
239
245 virtual void setWebRtcIpHandlingPolicy(WebRtcIpHandlingPolicy policy) = 0;
246
253 virtual bool isScrollbarsHidden() = 0;
254
260 virtual void showScrollbars() = 0;
261
267 virtual void hideScrollbars() = 0;
268
281
288
295
302
307
312
316 virtual uint32_t defaultFontSize() = 0;
317
327 virtual void setDefaultFontSize(uint32_t font_size_in_pixels) = 0;
328};
329
330} // namespace molybden
331
332#endif // MOLYBDEN_BROWSER_SETTINGS_HPP
Definition browser_settings.hpp:51
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