5#ifndef MOLYBDEN_APP_HPP
6#define MOLYBDEN_APP_HPP
11#include <unordered_set>
14#include "molybden/app/password_store_type.hpp"
15#include "molybden/app/ui_language.hpp"
16#include "molybden/base/logging.hpp"
238 const std::function<
void(std::shared_ptr<App> app)>& callback);
246 const std::function<
void(std::shared_ptr<App> app)>& callback);
268 virtual std::string
name() = 0;
309 virtual std::shared_ptr<Desktop>
desktop() = 0;
318 virtual std::shared_ptr<Dock>
dock() = 0;
327 virtual std::shared_ptr<Profile>
profile() = 0;
334 virtual std::shared_ptr<Profile>
profile(
const std::string&
name) = 0;
339 virtual std::vector<std::shared_ptr<Profile>>
profiles() = 0;
359 virtual std::vector<std::shared_ptr<Tray>>
trays() = 0;
Provides access to Molybden app.
Definition app.hpp:232
virtual std::string description()=0
Returns the current application description.
static void init(const AppOptions &options, const std::function< void(std::shared_ptr< App > app)> &callback)
Initializes this application and creates an application instance with the given options.
virtual std::vector< std::shared_ptr< Tray > > trays()=0
Returns the list of the available (non-destroyed) application trays.
static void init(const std::function< void(std::shared_ptr< App > app)> &callback)
Initializes this application and creates an application instance.
virtual void setMainMenu(std::shared_ptr< Menu > menu)=0
Sets the given menu as the application menu on macOS.
virtual std::shared_ptr< Desktop > desktop()=0
Returns the desktop instance that provides functionality related to the desktop environment.
virtual std::string getPath(PathKey key)=0
Returns absolute path to the directory specified by the given key or an empty string if there's no su...
virtual std::string name()=0
Returns the current application name.
virtual std::string baseUrl()=0
Returns the base URL of the resource that represents app user interface.
virtual AppTheme theme()=0
Returns the application theme.
virtual std::shared_ptr< Profile > profile()=0
Returns the default app profile.
virtual std::string version()=0
Returns the current application version.
virtual const AppOptions & options()=0
Returns the app options.
virtual std::shared_ptr< Dock > dock()=0
Returns an object that allows working with the application icon in the Dock on macOS.
virtual bool isProduction()=0
Indicates whether the app is running in the production or development mode.
virtual std::string copyright()=0
Returns the current application copyright.
virtual void setTheme(AppTheme theme)=0
Sets the given theme to the app.
virtual void quit()=0
Terminates this app instance.
virtual std::shared_ptr< Profile > profile(const std::string &name)=0
Returns the profile with the given name if it exists.
virtual std::vector< std::shared_ptr< Profile > > profiles()=0
Returns the list of the profiles in this app including the default profile.
virtual void deleteProfile(std::shared_ptr< Profile > profile)=0
Deletes the given profile from the list of available profiles, closes all browsers associated with it...
The Molybden app options.
Definition app.hpp:33
std::string user_data_dir
The absolute path to the directory where the user data such as cache, cookies, history,...
Definition app.hpp:45
uint32_t remote_debugging_port
The remote debugging port number.
Definition app.hpp:65
bool enable_autoplay
Allows automatically starting video and audio playbacks on the web pages.
Definition app.hpp:84
bool warn_before_quitting
Enables the warning on quitting the application via Cmd+Q.
Definition app.hpp:151
bool disable_sandbox
Disables Chromium Sandbox.
Definition app.hpp:72
bool enable_remote_debugging_port
Enables the remote debugging port in the production mode.
Definition app.hpp:55
Logging logging
Allows configuring the application logging.
Definition app.hpp:142
bool terminate_on_failed_check
Enables the application termination in case of a failed internal check.
Definition app.hpp:137
bool enable_h264
Enables support of the H.264 codec.
Definition app.hpp:106
std::vector< std::string > schemes
The schemes that will be intercepted.
Definition app.hpp:220
bool disable_crash_reporter
Indicates if the Chromium crash reporter is disabled on macOS.
Definition app.hpp:173
PasswordStoreType password_store_type
Configures the password store type that specifies which storage backend to use to encrypt cookies on ...
Definition app.hpp:182
std::string user_agent
A string used to override the default user agent with a custom one.
Definition app.hpp:187
UiLanguage ui_language
The language used on the default error pages and the message dialogs.
Definition app.hpp:50
bool disable_gpu
Disables GPU rendering.
Definition app.hpp:79
bool enable_aac
Enables support of the AAC codec.
Definition app.hpp:117
bool enable_incognito
Enables the incognito mode for the default profile.
Definition app.hpp:95
std::unordered_set< std::string > switches
The Chromium command line switches that will be passed to the Main Chromium process.
Definition app.hpp:226
bool quit_when_last_browser_closed
Indicates if the app should quit when the last browser is closed.
Definition app.hpp:158
bool enable_widevine
Enables support of the Widevine DRM decryption.
Definition app.hpp:127
Allows configuring the application logging.
Definition logging.hpp:19