Molybden API
Loading...
Searching...
No Matches
browser_delegates.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_DELEGATES_HPP
6#define MOLYBDEN_BROWSER_DELEGATES_HPP
7
8#include <memory>
9#include <vector>
10
11#include "molybden/base/delegate.hpp"
12#include "molybden/base/delegate_action.hpp"
13#include "molybden/browser/browser_command.hpp"
14#include "molybden/capture/capture_sources.hpp"
15#include "molybden/card/credit_card.hpp"
16#include "molybden/js/js_object.hpp"
17#include "molybden/menu/context_menu.hpp"
18#include "molybden/network/network.hpp"
19#include "molybden/network/tls/certificate.hpp"
20#include "molybden/ui/geometry.hpp"
21#include "molybden/user/user_profile.hpp"
22
23namespace molybden {
24
25class Frame;
26class Browser;
27class Download;
28
29enum class MediaType;
30
31struct HostPort;
32
40 std::shared_ptr<Browser> browser;
41
45 std::shared_ptr<Frame> frame;
46
50 std::shared_ptr<JsObject> window;
51};
52
56class InjectJsAction : public Action {
57 public:
58 explicit InjectJsAction(std::unique_ptr<rpc::internal::Callback> callback);
59
63 void proceed();
64};
65
73 std::shared_ptr<Browser> browser;
74
78 std::shared_ptr<Frame> frame;
79};
80
84class InjectCssAction : public Action {
85 public:
86 explicit InjectCssAction(std::unique_ptr<rpc::internal::Callback> callback);
87
96 void inject(const std::string& css);
97
101 void proceed();
102};
103
111 std::shared_ptr<Browser> browser;
112
117 NetError error;
118
123 std::string url;
124
129
135};
136
140class CertErrorAction : public Action {
141 public:
142 explicit CertErrorAction(std::unique_ptr<rpc::internal::Callback> callback);
143
147 void ignore();
148
153};
154
162 std::shared_ptr<Browser> browser;
163
167 std::string host;
168
173
178 std::vector<Certificate> intermediate_certs;
179
183 std::vector<CertVerificationError> verification_errors;
184};
185
189class VerifyCertAction : public Action {
190 public:
191 explicit VerifyCertAction(
192 std::unique_ptr<rpc::internal::Callback> callback);
193
197 void valid();
198
202 void invalid(const std::vector<CertVerificationStatus>& statuses);
203
208};
209
217 std::shared_ptr<Browser> browser;
218
222 std::shared_ptr<Browser> popup_browser;
223
227 std::string target_name;
228
232 std::string target_url;
233
242
248};
249
253class OpenPopupAction : public Action {
254 public:
255 explicit OpenPopupAction(std::unique_ptr<rpc::internal::Callback> callback);
256
260 void open();
261
265 void close();
266};
267
275 std::shared_ptr<Browser> browser;
276
280 std::string link_url;
281
285 std::string link_text;
286
290 std::string src_url;
291
295 std::string page_url;
296
300 std::string frame_url;
301
305 std::string selected_text;
306
311};
312
317 public:
318 explicit ShowContextMenuAction(
319 std::unique_ptr<rpc::internal::Callback> callback);
320
324 void show(std::shared_ptr<CustomContextMenu> context_menu);
325
330};
331
335struct AlertArgs {
339 std::shared_ptr<Browser> browser;
340
344 std::string title;
345
349 std::string message;
350
354 std::string ok_action_text;
355
359 std::string url;
360};
361
365class AlertAction : public Action {
366 public:
367 explicit AlertAction(std::unique_ptr<rpc::internal::Callback> callback);
368
372 void prompt();
373
377 void ok();
378};
379
387 std::shared_ptr<Browser> browser;
388
392 std::string title;
393
397 std::string message;
398
402 std::string ok_action_text;
403
408
412 std::string url;
413};
414
418class ConfirmAction : public Action {
419 public:
420 explicit ConfirmAction(std::unique_ptr<rpc::internal::Callback> callback);
421
425 void prompt();
426
430 void ok();
431
435 void cancel();
436};
437
445 std::shared_ptr<Browser> browser;
446
450 std::string title;
451
455 std::string message;
456
460 std::string ok_action_text;
461
466};
467
471class PromptAction : public Action {
472 public:
473 explicit PromptAction(std::unique_ptr<rpc::internal::Callback> callback);
474
478 void prompt();
479
484 void ok(const std::string& text);
485
489 void cancel();
490};
491
499 std::shared_ptr<Browser> browser;
500
504 std::string title;
505
509 std::string message;
510
514 std::string stay_action_text;
515
519 std::string leave_action_text;
520
526};
527
532 public:
533 explicit BeforeUnloadAction(
534 std::unique_ptr<rpc::internal::Callback> callback);
535
539 void prompt();
540
544 void stay();
545
549 void leave();
550};
551
559 std::shared_ptr<Browser> browser;
560
564 std::string title;
565
569 std::string message;
570
575
580};
581
586 public:
587 explicit BeforeFormRepostAction(
588 std::unique_ptr<rpc::internal::Callback> callback);
589
593 void repost();
594
598 void cancel();
599
603 void prompt();
604};
605
613 std::shared_ptr<Browser> browser;
614
619
625};
626
630class SaveAsPdfAction : public Action {
631 public:
632 explicit SaveAsPdfAction(std::unique_ptr<rpc::internal::Callback> callback);
633
638 void save(const std::string& file_path);
639
643 void cancel();
644
649 void prompt();
650};
651
659 std::shared_ptr<Browser> browser;
660
664 BrowserCommandId command_id;
665};
666
671 public:
673 std::unique_ptr<rpc::internal::Callback> callback);
674
678 void can();
679
683 void cannot();
684};
685
693 std::shared_ptr<Browser> browser;
694
703 std::shared_ptr<Frame> frame;
704
708 std::shared_ptr<Download> download;
709};
710
715 public:
716 explicit StartDownloadAction(
717 std::unique_ptr<rpc::internal::Callback> callback);
718
726 void download(const std::string& file_path);
727
731 void cancel();
732
737 void prompt();
738};
739
747 std::shared_ptr<Browser> browser;
748
752 std::string url;
753
757 std::string login;
758};
759
764 public:
765 explicit SavePasswordAction(
766 std::unique_ptr<rpc::internal::Callback> callback);
767
771 void save();
772
778 void neverSave();
779
783 void cancel();
784
790 void prompt();
791};
792
800 std::shared_ptr<Browser> browser;
801
805 std::string url;
806
810 std::string login;
811};
812
817 public:
818 explicit UpdatePasswordAction(
819 std::unique_ptr<rpc::internal::Callback> callback);
820
824 void update();
825
829 void cancel();
830
835 void prompt();
836};
837
845 std::shared_ptr<Browser> browser;
846
850 std::string url;
851
858 std::string scheme;
859
864
869};
870
875 public:
876 explicit AuthenticateAction(
877 std::unique_ptr<rpc::internal::Callback> callback);
878
882 void authenticate(const std::string& user_name, const std::string& password);
883
887 void cancel();
888
893 void prompt();
894};
895
903 std::shared_ptr<Browser> browser;
904
908 std::shared_ptr<Frame> frame;
909
913 std::string url;
914};
915
920 public:
922 std::unique_ptr<rpc::internal::Callback> callback);
923
930 void password(const std::string& password);
931
938 void cancel();
939
944 void prompt();
945};
946
954 std::shared_ptr<Browser> browser;
955
959 std::shared_ptr<Frame> frame;
960
964 std::string url;
965
970
975};
976
981 public:
983 std::unique_ptr<rpc::internal::Callback> callback);
984
994 void selectSource(const CaptureSource& source, bool capture_audio);
995
999 void selectSource(std::shared_ptr<Browser> browser, bool capture_audio);
1000
1004 void cancel();
1005
1009 void prompt();
1010};
1011
1019 std::shared_ptr<Browser> browser;
1020
1025};
1026
1031 public:
1032 explicit SaveCreditCardAction(
1033 std::unique_ptr<rpc::internal::Callback> callback);
1034
1038 void save();
1039
1043 void cancel();
1044
1050 void prompt();
1051};
1052
1060 std::shared_ptr<Browser> browser;
1061
1066};
1067
1072 public:
1073 explicit SaveUserProfileAction(
1074 std::unique_ptr<rpc::internal::Callback> callback);
1075
1079 void save();
1080
1084 void cancel();
1085
1091 void prompt();
1092};
1093
1113
1118 public:
1119 explicit UpdateUserProfileAction(
1120 std::unique_ptr<rpc::internal::Callback> callback);
1121
1125 void update();
1126
1130 void cancel();
1131
1137 void prompt();
1138};
1139
1144 public:
1162
1182
1199
1216
1233
1250
1267
1284
1302
1320
1338
1357
1374
1391
1409
1427
1446
1464
1482
1503
1524
1544};
1545
1546} // namespace molybden
1547
1548#endif // MOLYBDEN_BROWSER_DELEGATES_HPP
The base API that implements classes which represent delegate's action.
Definition delegate_action.hpp:18
The BrowserDelegates::onAlert action.
Definition browser_delegates.hpp:365
void prompt()
Show the native JavaScript alert dialog.
void ok()
Close the dialog as if the OK button was pressed.
The BrowserDelegates::onAuthenticate action.
Definition browser_delegates.hpp:874
void authenticate(const std::string &user_name, const std::string &password)
Authenticate with the given username and password.
void prompt()
Display a native authentication dialog where the end user can provide username and password.
void cancel()
Cancel the authentication request.
The BrowserDelegates::onBeforeFormRepost action arguments.
Definition browser_delegates.hpp:585
void prompt()
Show the dialog.
void cancel()
Cancel the web page reload.
void repost()
Resubmit the POST data.
The BrowserDelegates::onBeforeUnload action.
Definition browser_delegates.hpp:531
void leave()
Leave the current page.
void prompt()
Show the native JavaScript before unload dialog.
void stay()
Stay on the current page.
A class that contains all browser delegates.
Definition browser_delegates.hpp:1143
Delegate< PromptArgs, PromptAction > onPrompt
Invoked when the JavaScript dialog prompting the user to input some text should be displayed.
Definition browser_delegates.hpp:1301
Delegate< StartCaptureSessionArgs, StartCaptureSessionAction > onStartCaptureSession
Invoked when a web page requests permission to start a capture session.
Definition browser_delegates.hpp:1481
Delegate< UpdatePasswordArgs, UpdatePasswordAction > onUpdatePassword
Invoked when the the user is prompted to update the password credentials in the password store after ...
Definition browser_delegates.hpp:1426
Delegate< StartDownloadArgs, StartDownloadAction > onStartDownload
Invoked when the browser is about to start downloading a file.
Definition browser_delegates.hpp:1390
Delegate< ConfirmArgs, ConfirmAction > onConfirm
Invoked when the JavaScript confirmation dialog should be displayed.
Definition browser_delegates.hpp:1283
Delegate< AuthenticateArgs, AuthenticateAction > onAuthenticate
Invoked when an HTTP request receives an authentication challenge and it is unable to respond using t...
Definition browser_delegates.hpp:1445
Delegate< BeforeUnloadArgs, BeforeUnloadAction > onBeforeUnload
Invoked when the webpage is about to be unloaded and the JavaScript before unload confirmation dialog...
Definition browser_delegates.hpp:1319
Delegate< SavePasswordArgs, SavePasswordAction > onSavePassword
Invoked when the the user is prompted to save the password credentials in the password store after we...
Definition browser_delegates.hpp:1408
Delegate< OpenPopupArgs, OpenPopupAction > onOpenPopup
Invoked when a new popup window has been created and can be displayed.
Definition browser_delegates.hpp:1232
Delegate< SaveUserProfileArgs, SaveUserProfileAction > onSaveUserProfile
Invoked when user is prompted to save the user profile in the user profile store after web form submi...
Definition browser_delegates.hpp:1523
Delegate< RequestPdfPasswordArgs, RequestPdfPasswordAction > onRequestPdfPassword
Invoked when a web page needs a password to open an encrypted PDF document.
Definition browser_delegates.hpp:1463
Delegate< SaveCreditCardArgs, SaveCreditCardAction > onSaveCreditCard
Invoked when user is prompted to save the credit card credentials in the credit card store after web ...
Definition browser_delegates.hpp:1502
Delegate< SaveAsPdfArgs, SaveAsPdfAction > onSaveAsPdf
Invoked when the currently loaded web page is about to save as PDF document and the browser wants to ...
Definition browser_delegates.hpp:1356
Delegate< UpdateUserProfileArgs, UpdateUserProfileAction > onUpdateUserProfile
Invoked when user is prompted to update the user profile in the user profile store after web form sub...
Definition browser_delegates.hpp:1543
Delegate< BeforeFormRepostArgs, BeforeFormRepostAction > onBeforeFormRepost
Invoked when the web page with POST data is going to be reloaded and the user must confirm that the P...
Definition browser_delegates.hpp:1337
Delegate< ShowContextMenuArgs, ShowContextMenuAction > onShowContextMenu
Invoked when context menu on the loaded web page should be shown.
Definition browser_delegates.hpp:1249
Delegate< InjectJsArgs, InjectJsAction > onInjectJs
Invoked when a document element has been created and a custom JavaScript can be executed before any o...
Definition browser_delegates.hpp:1161
Delegate< CertErrorArgs, CertErrorAction > onCertError
Invoked when an SSL certificate error occurs during loading a web page.
Definition browser_delegates.hpp:1198
Delegate< CanExecuteCommandArgs, CanExecuteCommandAction > onCanExecuteCommand
Invoked to check if a browser command can be executed or not.
Definition browser_delegates.hpp:1373
Delegate< VerifyCertArgs, VerifyCertAction > onVerifyCert
Invoked when certificate verification is required.
Definition browser_delegates.hpp:1215
Delegate< AlertArgs, AlertAction > onAlert
Invoked when the JavaScript alert dialog should be displayed.
Definition browser_delegates.hpp:1266
Delegate< InjectCssArgs, InjectCssAction > onInjectCss
Invoked when a web page frame's document element has been created and a custom style sheet can be inj...
Definition browser_delegates.hpp:1181
The BrowserDelegates::onShowBeforeFormRepost action arguments.
Definition browser_delegates.hpp:670
void can()
The command can be executed.
void cannot()
The command is not supported and must be suppressed.
The source for a content capture session.
Definition capture_source.hpp:39
The BrowserDelegates::onCertError action.
Definition browser_delegates.hpp:140
void ignore()
Ignore the certificate error and load the requested resource.
void showErrorPage()
Display the error page with the certificate error details.
The BrowserDelegates::onConfirm action.
Definition browser_delegates.hpp:418
void cancel()
Close the dialog as if the cancel button was pressed.
void ok()
Close the dialog as if the OK button was pressed.
void prompt()
Show the native JavaScript confirm dialog.
Delegates allow you to make decisions that affect the application behavior.
Definition delegate.hpp:30
The BrowserDelegates::onInjectCss action.
Definition browser_delegates.hpp:84
void inject(const std::string &css)
Inject the given custom style sheet into the frame's document.
void proceed()
Continue without injecting a custom style sheet.
The BrowserDelegates::onInjectJs action.
Definition browser_delegates.hpp:56
void proceed()
Continue processing DOM and JavaScript on the frame.
The BrowserDelegates::onOpenPopup action.
Definition browser_delegates.hpp:253
void close()
Close the popup browser window.
void open()
Open the popup browser window and load the required resource.
The BrowserDelegates::onPrompt action.
Definition browser_delegates.hpp:471
void cancel()
Close the dialog as if the cancel button was pressed.
void prompt()
Show the native JavaScript prompt dialog.
void ok(const std::string &text)
Close the dialog as if the given text was entered and the OK button was pressed.
The BrowserDelegates::onRequestPdfPassword action.
Definition browser_delegates.hpp:919
void prompt()
Display a native prompt dialog where the end user can provide the password to open the encrypted PDF ...
void password(const std::string &password)
Use the given password to load the encrypted PDF document.
void cancel()
Cancel the request for the password.
The BrowserDelegates::onSaveAsPdf action arguments.
Definition browser_delegates.hpp:630
void cancel()
Cancel request to save the PDF file.
void save(const std::string &file_path)
Save the PDF file into the given target file path without displaying a Save File dialog.
void prompt()
Show the native Save File dialog when the user can select the directory where to save the PDF file.
The BrowserDelegates::onSaveCreditCard action.
Definition browser_delegates.hpp:1030
void save()
Save the credit card information in the credit card store.
void prompt()
Display the native prompt dialog where the end user can decide whether the credit card information sh...
void cancel()
Cancel the save credit card request.
The BrowserDelegates::onSavePassword action.
Definition browser_delegates.hpp:763
void save()
Save the password credentials in the password store.
void cancel()
Cancel the save password credentials request.
void prompt()
Display the native prompt dialog where the end user can decide whether the password credentials shoul...
void neverSave()
Associate the password credentials with the current web page and remember it as "never-saved".
The BrowserDelegates::onSaveUserProfile action.
Definition browser_delegates.hpp:1071
void prompt()
Display the native prompt dialog where the end user can decide whether the user profile should be sav...
void cancel()
Cancel the save user profile request.
void save()
Save the user profile in the user profile store.
The BrowserDelegates::onShowContextMenu action.
Definition browser_delegates.hpp:316
void show(std::shared_ptr< CustomContextMenu > context_menu)
Show the given context menu.
void showDefault()
Show the default context menu.
The BrowserDelegates::onStartCaptureSession action.
Definition browser_delegates.hpp:980
void selectSource(const CaptureSource &source, bool capture_audio)
Use the given capture source.
void selectSource(std::shared_ptr< Browser > browser, bool capture_audio)
Use the given browser instance as the capture source.
void cancel()
Cancel the capture session request.
void prompt()
Display the default dialog for choosing the capture source.
The BrowserDelegates::onStartDownload action.
Definition browser_delegates.hpp:714
void prompt()
Display the native Save File dialog where the end user can select the directory where to save the fil...
void download(const std::string &file_path)
Download and save the file at the given file path without displaying the Save File dialog.
void cancel()
Cancel file download.
The BrowserDelegates::onUpdatePassword action.
Definition browser_delegates.hpp:816
void update()
Update the password credentials in the password store.
void prompt()
Display the native prompt dialog where the end user can decide whether the password credentials shoul...
void cancel()
Cancel the update password credentials request.
The BrowserDelegates::onUpdateUserProfile action.
Definition browser_delegates.hpp:1117
void update()
Update the user profile in the user profile store.
void prompt()
Display the native prompt dialog where the end user can decide whether the user profile should be upd...
void cancel()
Cancel the update user profile request.
The BrowserDelegates::onVerifyCert action.
Definition browser_delegates.hpp:189
void valid()
Mark the given certificate as valid.
void invalid(const std::vector< CertVerificationStatus > &statuses)
Mark the given certificate as invalid with the specific statuses.
void defaultAction()
Use the default behavior and let Chromium verify the certificate.
The BrowserDelegates::onAlert action arguments.
Definition browser_delegates.hpp:335
std::string ok_action_text
The localized text of the "OK" action.
Definition browser_delegates.hpp:354
std::string message
The text passed to the window.alert() JavaScript function.
Definition browser_delegates.hpp:349
std::string title
The localized dialog title.
Definition browser_delegates.hpp:344
std::shared_ptr< Browser > browser
The browser instance initiated this action.
Definition browser_delegates.hpp:339
std::string url
The URL of the web page that requested to display the alert dialog.
Definition browser_delegates.hpp:359
The BrowserDelegates::onAuthenticate action arguments.
Definition browser_delegates.hpp:841
HostPort host_port
The host-port pair identifying the resource requesting authentication.
Definition browser_delegates.hpp:863
std::string url
The address of a resource requesting authentication.
Definition browser_delegates.hpp:850
bool is_proxy
Indicates if the authentication request is issued by a proxy server.
Definition browser_delegates.hpp:868
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:845
std::string scheme
The authentication scheme such as "basic" or "digest".
Definition browser_delegates.hpp:858
The BrowserDelegates::onBeforeFormRepost action arguments.
Definition browser_delegates.hpp:555
std::string title
The localized dialog title.
Definition browser_delegates.hpp:564
std::string cancel_action_text
The localized text of the "Cancel" action.
Definition browser_delegates.hpp:579
std::string repost_action_text
The localized text of the "Repost" action.
Definition browser_delegates.hpp:574
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:559
std::string message
The localized text of the form repost warning.
Definition browser_delegates.hpp:569
The BrowserDelegates::onBeforeUnload action arguments.
Definition browser_delegates.hpp:495
std::string title
The localized dialog title.
Definition browser_delegates.hpp:504
std::shared_ptr< Browser > browser
The browser instance initiated this action.
Definition browser_delegates.hpp:499
std::string leave_action_text
The localized text of the "Leave" action.
Definition browser_delegates.hpp:519
std::string stay_action_text
The localized text of the "Stay" action.
Definition browser_delegates.hpp:514
bool is_reload
Determines whether this callback is invoked as a result of reloading the current web page.
Definition browser_delegates.hpp:525
std::string message
The text passed to the window.onbeforeunload() JavaScript function.
Definition browser_delegates.hpp:509
The BrowserDelegates::onCanExecuteCommand action arguments.
Definition browser_delegates.hpp:655
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:659
BrowserCommandId command_id
The standard browser command id.
Definition browser_delegates.hpp:664
Provides access to the sources available for content capture.
Definition capture_sources.hpp:17
The BrowserDelegates::onCertError action arguments.
Definition browser_delegates.hpp:107
bool is_main_frame
Indicates whether the navigation is taking place in the main frame.
Definition browser_delegates.hpp:128
std::string url
Represents the URL of the request that required the client certificate selection.
Definition browser_delegates.hpp:123
Certificate certificate
The SSL certificate bound to the request which the certificate error occurred in.
Definition browser_delegates.hpp:134
NetError error
Returns the network error code which describes the reason of the certificate error.
Definition browser_delegates.hpp:117
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:111
Definition certificate.hpp:37
The BrowserDelegates::onConfirm action arguments.
Definition browser_delegates.hpp:383
std::string url
The URL of the web page that requested to display a confirmation dialog.
Definition browser_delegates.hpp:412
std::string message
The text passed to the window.confirm() JavaScript function.
Definition browser_delegates.hpp:397
std::shared_ptr< Browser > browser
The browser instance initiated this action.
Definition browser_delegates.hpp:387
std::string title
The localized dialog title.
Definition browser_delegates.hpp:392
std::string ok_action_text
The localized text of the "OK" action.
Definition browser_delegates.hpp:402
std::string cancel_action_text
The localized text of the "Cancel" action.
Definition browser_delegates.hpp:407
Definition context_menu.hpp:18
The credit card information persisted in the credit card store.
Definition credit_card.hpp:38
A host/port pair of the URI.
Definition url_request.hpp:233
The BrowserDelegates::onInjectCss action arguments.
Definition browser_delegates.hpp:69
std::shared_ptr< Frame > frame
The frame which DOM document has been created.
Definition browser_delegates.hpp:78
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:73
The BrowserDelegates::onInjectJs action arguments.
Definition browser_delegates.hpp:36
std::shared_ptr< Frame > frame
The frame which DOM document has been loaded.
Definition browser_delegates.hpp:45
std::shared_ptr< JsObject > window
The Window JavaScript object of the frame.
Definition browser_delegates.hpp:50
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:40
The BrowserDelegates::onOpenPopup action arguments.
Definition browser_delegates.hpp:213
float scale_factor
The scale factor of the display where the parent browser window initiated this action is displayed.
Definition browser_delegates.hpp:247
std::string target_url
The target URL that will be loaded in the popup.
Definition browser_delegates.hpp:232
Rect initial_bounds
The initial bounds of the popup.
Definition browser_delegates.hpp:241
std::string target_name
The window target name.
Definition browser_delegates.hpp:227
std::shared_ptr< Browser > browser
The browser instance initiated this action.
Definition browser_delegates.hpp:217
std::shared_ptr< Browser > popup_browser
The browser instance of the created popup.
Definition browser_delegates.hpp:222
The BrowserDelegates::onPrompt action arguments.
Definition browser_delegates.hpp:441
std::string title
The localized dialog title.
Definition browser_delegates.hpp:450
std::string message
The text passed to the window.prompt() JavaScript function.
Definition browser_delegates.hpp:455
std::shared_ptr< Browser > browser
The browser instance initiated this action.
Definition browser_delegates.hpp:445
std::string ok_action_text
The localized text of the "Ok" action.
Definition browser_delegates.hpp:460
std::string cancel_action_text
The localized text of the "Cancel" action.
Definition browser_delegates.hpp:465
A rectangle described by the location and dimensions.
Definition geometry.hpp:75
The BrowserDelegates::onRequestPdfPassword action arguments.
Definition browser_delegates.hpp:899
std::shared_ptr< Frame > frame
The frame containing the encrypted PDF document.
Definition browser_delegates.hpp:908
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:903
std::string url
The URL of the encrypted PDF document.
Definition browser_delegates.hpp:913
The BrowserDelegates::onSaveAsPdf action arguments.
Definition browser_delegates.hpp:609
std::string suggested_directory_path
The absolute path to the directory where the target PDF file is suggested to be saved.
Definition browser_delegates.hpp:624
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:613
std::string suggested_file_name
The suggested name of the target PDF file.
Definition browser_delegates.hpp:618
The BrowserDelegates::onSaveCreditCard action arguments.
Definition browser_delegates.hpp:1015
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:1019
CreditCard credit_card
The credit card information entered in the web form.
Definition browser_delegates.hpp:1024
The BrowserDelegates::onSavePassword action arguments.
Definition browser_delegates.hpp:743
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:747
std::string login
The login value passed in the form.
Definition browser_delegates.hpp:757
std::string url
The URL of the resource where the form is located.
Definition browser_delegates.hpp:752
The BrowserDelegates::onSaveUserProfile action arguments.
Definition browser_delegates.hpp:1056
UserProfile user_profile
The user data entered in the web form.
Definition browser_delegates.hpp:1065
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:1060
The BrowserDelegates::onShowContextMenu action arguments.
Definition browser_delegates.hpp:271
std::string link_text
The text associated with the link.
Definition browser_delegates.hpp:285
std::string page_url
The source URL of the top level page that the context menu is invoked on.
Definition browser_delegates.hpp:295
ContextMenuContentType content_type
The content type of the node the context menu is invoked on.
Definition browser_delegates.hpp:310
std::string src_url
The source URL of the HTML element that the context menu is invoked on.
Definition browser_delegates.hpp:290
std::string link_url
The URL of the link that encloses the node the context menu is invoked on.
Definition browser_delegates.hpp:280
std::string frame_url
The URL of the sub-frame that the context menu is invoked on.
Definition browser_delegates.hpp:300
std::string selected_text
The text of the selection that the context menu is invoked on.
Definition browser_delegates.hpp:305
std::shared_ptr< Browser > browser
The browser instance initiated this action.
Definition browser_delegates.hpp:275
The BrowserDelegates::onStartCaptureSession action arguments.
Definition browser_delegates.hpp:950
bool audio_capture_requested
Indicates if the page requests audio capture as well as the video content.
Definition browser_delegates.hpp:974
CaptureSources sources
The available capture sources.
Definition browser_delegates.hpp:969
std::string url
The URL of the web page.
Definition browser_delegates.hpp:964
std::shared_ptr< Frame > frame
The frame starting the capture session.
Definition browser_delegates.hpp:959
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:954
The BrowserDelegates::onStartDownload action arguments.
Definition browser_delegates.hpp:689
std::shared_ptr< Frame > frame
The frame initiated this download or an empty std::shared_ptr if the frame is already closed and dest...
Definition browser_delegates.hpp:703
std::shared_ptr< Download > download
The download activity instance.
Definition browser_delegates.hpp:708
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:693
The BrowserDelegates::onUpdatePassword action arguments.
Definition browser_delegates.hpp:796
std::string login
The login value passed in the form.
Definition browser_delegates.hpp:810
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:800
std::string url
The URL of the resource where the form is located.
Definition browser_delegates.hpp:805
The BrowserDelegates::onUpdateUserProfile action arguments.
Definition browser_delegates.hpp:1097
UserProfile user_profile
The new user data entered in the web form.
Definition browser_delegates.hpp:1106
UserProfile original_user_profile
The original user data that is about to update.
Definition browser_delegates.hpp:1111
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:1101
The collected data entered by the user to a form and persisted to the user data store.
Definition user_profile.hpp:16
The BrowserDelegates::onVerifyCert action arguments.
Definition browser_delegates.hpp:158
std::vector< CertVerificationError > verification_errors
The list of errors found by the default SSL certificate verifier.
Definition browser_delegates.hpp:183
std::vector< Certificate > intermediate_certs
The list of intermediate certificates in the chain of the validated certificate.
Definition browser_delegates.hpp:178
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:162
std::string host
The host name of the SSL server that requests the certificate verification.
Definition browser_delegates.hpp:167
Certificate certificate
The certificate that is requested to be verified.
Definition browser_delegates.hpp:172