Molybden
Loading...
Searching...
No Matches
browser_delegates.hpp
1// Copyright (c) 2000-2023 TeamDev Ltd. 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/browser/input_events.hpp"
15#include "molybden/capture/capture_sources.hpp"
16#include "molybden/card/credit_card.hpp"
17#include "molybden/js/js_object.hpp"
18#include "molybden/menu/context_menu.hpp"
19#include "molybden/menu/menu.hpp"
20#include "molybden/network/network.hpp"
21#include "molybden/network/tls/certificate.hpp"
22#include "molybden/ui/geometry.hpp"
23#include "molybden/user/user_profile.hpp"
24
25namespace molybden {
26
27class Frame;
28class Browser;
29class Download;
30
31enum class MediaType;
32
33struct HostPort;
34
42 std::shared_ptr<Browser> browser;
43
47 std::shared_ptr<Frame> frame;
48
52 std::shared_ptr<JsObject> window;
53};
54
58class InjectJsAction : public Action {
59 public:
60 explicit InjectJsAction(std::unique_ptr<rpc::internal::Callback> callback);
61
65 void proceed();
66};
67
75 std::shared_ptr<Browser> browser;
76
80 std::shared_ptr<Frame> frame;
81};
82
86class InjectCssAction : public Action {
87 public:
88 explicit InjectCssAction(std::unique_ptr<rpc::internal::Callback> callback);
89
98 void inject(const std::string& css);
99
103 void proceed();
104};
105
113 std::shared_ptr<Browser> browser;
114
119 NetError error;
120
125 std::string url;
126
131
137};
138
142class CertErrorAction : public Action {
143 public:
144 explicit CertErrorAction(std::unique_ptr<rpc::internal::Callback> callback);
145
149 void ignore();
150
155};
156
164 std::shared_ptr<Browser> browser;
165
169 std::string host;
170
175
180 std::vector<Certificate> intermediate_certs;
181
185 std::vector<CertVerificationError> verification_errors;
186};
187
191class VerifyCertAction : public Action {
192 public:
193 explicit VerifyCertAction(
194 std::unique_ptr<rpc::internal::Callback> callback);
195
199 void valid();
200
204 void invalid(const std::vector<CertVerificationStatus>& statuses);
205
210};
211
219 std::shared_ptr<Browser> browser;
220
225};
226
230class EnterMouseAction : public Action {
231 public:
232 explicit EnterMouseAction(std::unique_ptr<rpc::internal::Callback> callback);
233
237 void proceed();
238
242 void suppress();
243};
244
252 std::shared_ptr<Browser> browser;
253
258};
259
263class ExitMouseAction : public Action {
264 public:
265 explicit ExitMouseAction(std::unique_ptr<rpc::internal::Callback> callback);
266
270 void proceed();
271
275 void suppress();
276};
277
285 std::shared_ptr<Browser> browser;
286
291};
292
296class MoveMouseAction : public Action {
297 public:
298 explicit MoveMouseAction(std::unique_ptr<rpc::internal::Callback> callback);
299
303 void proceed();
304
308 void suppress();
309};
310
318 std::shared_ptr<Browser> browser;
319
324};
325
330 public:
331 explicit MoveMouseWheelAction(
332 std::unique_ptr<rpc::internal::Callback> callback);
333
337 void proceed();
338
342 void suppress();
343};
344
352 std::shared_ptr<Browser> browser;
353
358};
359
363class PressMouseAction : public Action {
364 public:
365 explicit PressMouseAction(std::unique_ptr<rpc::internal::Callback> callback);
366
370 void proceed();
371
375 void suppress();
376};
377
385 std::shared_ptr<Browser> browser;
386
391};
392
397 public:
398 explicit ReleaseMouseAction(
399 std::unique_ptr<rpc::internal::Callback> callback);
400
404 void proceed();
405
409 void suppress();
410};
411
419 std::shared_ptr<Browser> browser;
420
425};
426
430class PressKeyAction : public Action {
431 public:
432 explicit PressKeyAction(std::unique_ptr<rpc::internal::Callback> callback);
433
437 void proceed();
438
442 void suppress();
443};
444
452 std::shared_ptr<Browser> browser;
453
458};
459
463class ReleaseKeyAction : public Action {
464 public:
465 explicit ReleaseKeyAction(std::unique_ptr<rpc::internal::Callback> callback);
466
470 void proceed();
471
475 void suppress();
476};
477
485 std::shared_ptr<Browser> browser;
486
491};
492
496class TypeKeyAction : public Action {
497 public:
498 explicit TypeKeyAction(std::unique_ptr<rpc::internal::Callback> callback);
499
503 void proceed();
504
508 void suppress();
509};
510
518 std::shared_ptr<Browser> browser;
519
523 std::shared_ptr<Browser> popup_browser;
524
528 std::string target_name;
529
533 std::string target_url;
534
543
549};
550
554class OpenPopupAction : public Action {
555 public:
556 explicit OpenPopupAction(std::unique_ptr<rpc::internal::Callback> callback);
557
561 void open();
562};
563
571 std::shared_ptr<Browser> browser;
572
576 std::string link_url;
577
581 std::string link_text;
582
586 std::string src_url;
587
591 std::string page_url;
592
596 std::string frame_url;
597
601 std::string selected_text;
602
607};
608
613 public:
614 explicit ShowContextMenuAction(
615 std::unique_ptr<rpc::internal::Callback> callback);
616
620 void show(std::shared_ptr<CustomContextMenu> context_menu);
621};
622
626struct AlertArgs {
630 std::shared_ptr<Browser> browser;
631
635 std::string title;
636
640 std::string message;
641
645 std::string ok_action_text;
646
650 std::string url;
651};
652
656class AlertAction : public Action {
657 public:
658 explicit AlertAction(std::unique_ptr<rpc::internal::Callback> callback);
659
663 void prompt();
664
668 void ok();
669};
670
678 std::shared_ptr<Browser> browser;
679
683 std::string title;
684
688 std::string message;
689
693 std::string ok_action_text;
694
699
703 std::string url;
704};
705
709class ConfirmAction : public Action {
710 public:
711 explicit ConfirmAction(std::unique_ptr<rpc::internal::Callback> callback);
712
716 void prompt();
717
721 void ok();
722
726 void cancel();
727};
728
736 std::shared_ptr<Browser> browser;
737
741 std::string title;
742
746 std::string message;
747
751 std::string ok_action_text;
752
757};
758
762class PromptAction : public Action {
763 public:
764 explicit PromptAction(std::unique_ptr<rpc::internal::Callback> callback);
765
769 void prompt();
770
775 void ok(const std::string& text);
776
780 void cancel();
781};
782
790 std::shared_ptr<Browser> browser;
791
795 std::string title;
796
800 std::string message;
801
805 std::string stay_action_text;
806
810 std::string leave_action_text;
811
817};
818
823 public:
824 explicit BeforeUnloadAction(
825 std::unique_ptr<rpc::internal::Callback> callback);
826
830 void prompt();
831
835 void stay();
836
840 void leave();
841};
842
850 std::shared_ptr<Browser> browser;
851
855 std::string title;
856
860 std::string message;
861
866
871};
872
877 public:
878 explicit BeforeFormRepostAction(
879 std::unique_ptr<rpc::internal::Callback> callback);
880
884 void repost();
885
889 void cancel();
890
894 void prompt();
895};
896
904 std::shared_ptr<Browser> browser;
905
910
916};
917
921class SaveAsPdfAction : public Action {
922 public:
923 explicit SaveAsPdfAction(std::unique_ptr<rpc::internal::Callback> callback);
924
929 void save(const std::string& file_path);
930
934 void cancel();
935
940 void prompt();
941};
942
950 std::shared_ptr<Browser> browser;
951
955 BrowserCommandId command_id;
956};
957
962 public:
964 std::unique_ptr<rpc::internal::Callback> callback);
965
969 void can();
970
974 void cannot();
975};
976
984 std::shared_ptr<Browser> browser;
985
994 std::shared_ptr<Frame> frame;
995
999 std::shared_ptr<Download> download;
1000};
1001
1006 public:
1007 explicit StartDownloadAction(
1008 std::unique_ptr<rpc::internal::Callback> callback);
1009
1017 void download(const std::string& file_path);
1018
1022 void cancel();
1023
1028 void prompt();
1029};
1030
1038 std::shared_ptr<Browser> browser;
1039
1043 std::string url;
1044
1048 std::string login;
1049};
1050
1055 public:
1056 explicit SavePasswordAction(
1057 std::unique_ptr<rpc::internal::Callback> callback);
1058
1062 void save();
1063
1070
1074 void cancel();
1075
1081 void prompt();
1082};
1083
1091 std::shared_ptr<Browser> browser;
1092
1096 std::string url;
1097
1101 std::string login;
1102};
1103
1108 public:
1109 explicit UpdatePasswordAction(
1110 std::unique_ptr<rpc::internal::Callback> callback);
1111
1115 void update();
1116
1120 void cancel();
1121
1126 void prompt();
1127};
1128
1136 std::shared_ptr<Browser> browser;
1137
1141 std::string url;
1142
1149 std::string scheme;
1150
1155
1160};
1161
1166 public:
1167 explicit AuthenticateAction(
1168 std::unique_ptr<rpc::internal::Callback> callback);
1169
1173 void authenticate(const std::string& user_name, const std::string& password);
1174
1178 void cancel();
1179
1184 void prompt();
1185};
1186
1194 std::shared_ptr<Browser> browser;
1195
1199 std::shared_ptr<Frame> frame;
1200
1204 std::string url;
1205};
1206
1211 public:
1212 explicit RequestPdfPasswordAction(
1213 std::unique_ptr<rpc::internal::Callback> callback);
1214
1221 void password(const std::string& password);
1222
1229 void cancel();
1230
1235 void prompt();
1236};
1237
1245 std::shared_ptr<Browser> browser;
1246
1250 std::shared_ptr<Frame> frame;
1251
1255 std::string url;
1256
1261
1266};
1267
1272 public:
1274 std::unique_ptr<rpc::internal::Callback> callback);
1275
1285 void selectSource(const CaptureSource& source, bool capture_audio);
1286
1290 void selectSource(std::shared_ptr<Browser> browser, bool capture_audio);
1291
1295 void cancel();
1296
1300 void prompt();
1301};
1302
1310 std::shared_ptr<Browser> browser;
1311
1316};
1317
1322 public:
1323 explicit SaveCreditCardAction(
1324 std::unique_ptr<rpc::internal::Callback> callback);
1325
1329 void save();
1330
1334 void cancel();
1335
1341 void prompt();
1342};
1343
1351 std::shared_ptr<Browser> browser;
1352
1357};
1358
1363 public:
1364 explicit SaveUserProfileAction(
1365 std::unique_ptr<rpc::internal::Callback> callback);
1366
1370 void save();
1371
1375 void cancel();
1376
1382 void prompt();
1383};
1384
1392 std::shared_ptr<Browser> browser;
1393
1398
1403};
1404
1409 public:
1410 explicit UpdateUserProfileAction(
1411 std::unique_ptr<rpc::internal::Callback> callback);
1412
1416 void update();
1417
1421 void cancel();
1422
1428 void prompt();
1429};
1430
1435 public:
1453
1473
1490
1507
1526
1545
1564
1601
1620
1639
1658
1677
1694
1711
1728
1745
1763
1781
1799
1818
1835
1852
1870
1888
1907
1925
1943
1964
1985
2005};
2006
2007} // namespace molybden
2008
2009#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:656
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:1165
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:876
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:822
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:1434
Delegate< PromptArgs, PromptAction > onPrompt
Invoked when the JavaScript dialog prompting the user to input some text should be displayed.
Definition browser_delegates.hpp:1762
Delegate< StartCaptureSessionArgs, StartCaptureSessionAction > onStartCaptureSession
Invoked when a web page requests permission to start a capture session.
Definition browser_delegates.hpp:1942
Delegate< ExitMouseArgs, ExitMouseAction > onExitMouse
Invoked when a MouseExited event is about to be processed by the browser.
Definition browser_delegates.hpp:1600
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:1887
Delegate< StartDownloadArgs, StartDownloadAction > onStartDownload
Invoked when the browser is about to start downloading a file.
Definition browser_delegates.hpp:1851
Delegate< TypeKeyArgs, TypeKeyAction > onTypeKey
Invoked when a KeyTyped event is about to be processed by the browser.
Definition browser_delegates.hpp:1563
Delegate< ConfirmArgs, ConfirmAction > onConfirm
Invoked when the JavaScript confirmation dialog should be displayed.
Definition browser_delegates.hpp:1744
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:1906
Delegate< MoveMouseArgs, MoveMouseAction > onMoveMouse
Invoked when a MouseMoved event is about to be processed by the browser.
Definition browser_delegates.hpp:1619
Delegate< MoveMouseWheelArgs, MoveMouseWheelAction > onMoveMouseWheel
Invoked when a MouseWheel event is about to be processed by the browser.
Definition browser_delegates.hpp:1676
Delegate< BeforeUnloadArgs, BeforeUnloadAction > onBeforeUnload
Invoked when the webpage is about to be unloaded and the JavaScript before unload confirmation dialog...
Definition browser_delegates.hpp:1780
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:1869
Delegate< PressMouseArgs, PressMouseAction > onPressMouse
Invoked when a MousePressed event is about to be processed by the browser.
Definition browser_delegates.hpp:1657
Delegate< OpenPopupArgs, OpenPopupAction > onOpenPopup
Invoked when a new popup window has been created and can be displayed.
Definition browser_delegates.hpp:1693
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:1984
Delegate< RequestPdfPasswordArgs, RequestPdfPasswordAction > onRequestPdfPassword
Invoked when a web page needs a password to open an encrypted PDF document.
Definition browser_delegates.hpp:1924
Delegate< PressKeyArgs, PressKeyAction > onPressKey
Invoked when a KeyPressed event is about to be processed by the browser.
Definition browser_delegates.hpp:1525
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:1963
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:1817
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:2004
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:1798
Delegate< ShowContextMenuArgs, ShowContextMenuAction > onShowContextMenu
Invoked when context menu on the loaded web page should be shown.
Definition browser_delegates.hpp:1710
Delegate< EnterMouseArgs, EnterMouseAction > onEnterMouse
Invoked when a MouseEntered event is about to be processed by the browser.
Definition browser_delegates.hpp:1582
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:1452
Delegate< ReleaseMouseArgs, ReleaseMouseAction > onReleaseMouse
Invoked when a MouseReleased event is about to be processed by the browser.
Definition browser_delegates.hpp:1638
Delegate< CertErrorArgs, CertErrorAction > onCertError
Invoked when an SSL certificate error occurs during loading a web page.
Definition browser_delegates.hpp:1489
Delegate< ReleaseKeyArgs, ReleaseKeyAction > onReleaseKey
Invoked when a KeyReleased event is about to be processed by the browser.
Definition browser_delegates.hpp:1544
Delegate< CanExecuteCommandArgs, CanExecuteCommandAction > onCanExecuteCommand
Invoked to check if a browser command can be executed or not.
Definition browser_delegates.hpp:1834
Delegate< VerifyCertArgs, VerifyCertAction > onVerifyCert
Invoked when certificate verification is required.
Definition browser_delegates.hpp:1506
Delegate< AlertArgs, AlertAction > onAlert
Invoked when the JavaScript alert dialog should be displayed.
Definition browser_delegates.hpp:1727
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:1472
The BrowserDelegates::onShowBeforeFormRepost action arguments.
Definition browser_delegates.hpp:961
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:142
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:709
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::onEnterMouse action.
Definition browser_delegates.hpp:230
void suppress()
Suppress the mouse event.
void proceed()
Continue processing the mouse event.
The BrowserDelegates::onExitMouse action.
Definition browser_delegates.hpp:263
void proceed()
Continue processing the mouse event.
void suppress()
Suppress the mouse event.
The BrowserDelegates::onInjectCss action.
Definition browser_delegates.hpp:86
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:58
void proceed()
Continue processing DOM and JavaScript on the frame.
The BrowserDelegates::onMoveMouse action.
Definition browser_delegates.hpp:296
void proceed()
Continue processing the mouse event.
void suppress()
Suppress the mouse event.
The BrowserDelegates::onMoveMouseWheel action.
Definition browser_delegates.hpp:329
void proceed()
Continue processing the mouse event.
void suppress()
Suppress the mouse event.
The BrowserDelegates::onOpenPopup action.
Definition browser_delegates.hpp:554
void open()
Open the popup browser window and load the required resource.
The BrowserDelegate::OnPressKey action.
Definition browser_delegates.hpp:430
void suppress()
Suppress the keyboard event.
void proceed()
Continue processing the keyboard event.
The BrowserDelegates::onPressMouse action.
Definition browser_delegates.hpp:363
void suppress()
Suppress the mouse event.
void proceed()
Continue processing the mouse event.
The BrowserDelegates::onPrompt action.
Definition browser_delegates.hpp:762
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::onReleaseKey action arguments.
Definition browser_delegates.hpp:463
void suppress()
Suppress the keyboard event.
void proceed()
Continue processing the keyboard event.
The BrowserDelegates::onReleaseMouse action.
Definition browser_delegates.hpp:396
void proceed()
Continue processing the mouse event.
void suppress()
Suppress the mouse event.
The BrowserDelegates::onRequestPdfPassword action.
Definition browser_delegates.hpp:1210
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:921
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:1321
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:1054
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:1362
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:612
void show(std::shared_ptr< CustomContextMenu > context_menu)
Show the given context menu.
The BrowserDelegates::onStartCaptureSession action.
Definition browser_delegates.hpp:1271
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:1005
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::onTypeKey action arguments.
Definition browser_delegates.hpp:496
void suppress()
Suppress the keyboard event.
void proceed()
Continue processing the keyboard event.
The BrowserDelegates::onUpdatePassword action.
Definition browser_delegates.hpp:1107
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:1408
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:191
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:626
std::string ok_action_text
The localized text of the "OK" action.
Definition browser_delegates.hpp:645
std::string message
The text passed to the window.alert() JavaScript function.
Definition browser_delegates.hpp:640
std::string title
The localized dialog title.
Definition browser_delegates.hpp:635
std::shared_ptr< Browser > browser
The browser instance initiated this action.
Definition browser_delegates.hpp:630
std::string url
The URL of the web page that requested to display the alert dialog.
Definition browser_delegates.hpp:650
The BrowserDelegates::onAuthenticate action arguments.
Definition browser_delegates.hpp:1132
HostPort host_port
The host-port pair identifying the resource requesting authentication.
Definition browser_delegates.hpp:1154
std::string url
The address of a resource requesting authentication.
Definition browser_delegates.hpp:1141
bool is_proxy
Indicates if the authentication request is issued by a proxy server.
Definition browser_delegates.hpp:1159
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:1136
std::string scheme
The authentication scheme such as "basic" or "digest".
Definition browser_delegates.hpp:1149
The BrowserDelegates::onBeforeFormRepost action arguments.
Definition browser_delegates.hpp:846
std::string title
The localized dialog title.
Definition browser_delegates.hpp:855
std::string cancel_action_text
The localized text of the "Cancel" action.
Definition browser_delegates.hpp:870
std::string repost_action_text
The localized text of the "Repost" action.
Definition browser_delegates.hpp:865
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:850
std::string message
The localized text of the form repost warning.
Definition browser_delegates.hpp:860
The BrowserDelegates::onBeforeUnload action arguments.
Definition browser_delegates.hpp:786
std::string title
The localized dialog title.
Definition browser_delegates.hpp:795
std::shared_ptr< Browser > browser
The browser instance initiated this action.
Definition browser_delegates.hpp:790
std::string leave_action_text
The localized text of the "Leave" action.
Definition browser_delegates.hpp:810
std::string stay_action_text
The localized text of the "Stay" action.
Definition browser_delegates.hpp:805
bool is_reload
Determines whether this callback is invoked as a result of reloading the current web page.
Definition browser_delegates.hpp:816
std::string message
The text passed to the window.onbeforeunload() JavaScript function.
Definition browser_delegates.hpp:800
The BrowserDelegates::onCanExecuteCommand action arguments.
Definition browser_delegates.hpp:946
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:950
BrowserCommandId command_id
The standard browser command id.
Definition browser_delegates.hpp:955
Provides access to the sources available for content capture.
Definition capture_sources.hpp:17
The BrowserDelegates::onCertError action arguments.
Definition browser_delegates.hpp:109
bool is_main_frame
Indicates whether the navigation is taking place in the main frame.
Definition browser_delegates.hpp:130
std::string url
Represents the URL of the request that required the client certificate selection.
Definition browser_delegates.hpp:125
Certificate certificate
The SSL certificate bound to the request which the certificate error occurred in.
Definition browser_delegates.hpp:136
NetError error
Returns the network error code which describes the reason of the certificate error.
Definition browser_delegates.hpp:119
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:113
Definition certificate.hpp:37
The BrowserDelegates::onConfirm action arguments.
Definition browser_delegates.hpp:674
std::string url
The URL of the web page that requested to display a confirmation dialog.
Definition browser_delegates.hpp:703
std::string message
The text passed to the window.confirm() JavaScript function.
Definition browser_delegates.hpp:688
std::shared_ptr< Browser > browser
The browser instance initiated this action.
Definition browser_delegates.hpp:678
std::string title
The localized dialog title.
Definition browser_delegates.hpp:683
std::string ok_action_text
The localized text of the "OK" action.
Definition browser_delegates.hpp:693
std::string cancel_action_text
The localized text of the "Cancel" action.
Definition browser_delegates.hpp:698
Definition context_menu.hpp:17
The credit card information persisted in the credit card store.
Definition credit_card.hpp:38
The BrowserDelegates::onEnterMouse action arguments.
Definition browser_delegates.hpp:215
MouseEntered event
The MouseEntered event that is about to be processed by the browser.
Definition browser_delegates.hpp:224
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:219
The BrowserDelegates::onExitMouse action arguments.
Definition browser_delegates.hpp:248
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:252
MouseExited event
The MouseExited event that is about to be processed by the browser.
Definition browser_delegates.hpp:257
A host/port pair of the URI.
Definition url_request.hpp:233
The BrowserDelegates::onInjectCss action arguments.
Definition browser_delegates.hpp:71
std::shared_ptr< Frame > frame
The frame which DOM document has been created.
Definition browser_delegates.hpp:80
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:75
The BrowserDelegates::onInjectJs action arguments.
Definition browser_delegates.hpp:38
std::shared_ptr< Frame > frame
The frame which DOM document has been loaded.
Definition browser_delegates.hpp:47
std::shared_ptr< JsObject > window
The Window JavaScript object of the frame.
Definition browser_delegates.hpp:52
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:42
An event indicating that a keyboard key has been pressed.
Definition input_events.hpp:343
An event indicating that a keyboard key has been released.
Definition input_events.hpp:377
An event indicating that a keyboard character key has been typed.
Definition input_events.hpp:360
An event indicating that the mouse has been moved over the web page.
Definition input_events.hpp:543
An event indicating that the mouse has been moved out of the web page.
Definition input_events.hpp:565
An event indicating that the mouse has been moved.
Definition input_events.hpp:429
An event indicating that the mouse button has been pressed.
Definition input_events.hpp:481
An event indicating that the mouse button has been released.
Definition input_events.hpp:512
An event indicating that the mouse wheel button has been rotated.
Definition input_events.hpp:449
The BrowserDelegates::onMoveMouse action arguments.
Definition browser_delegates.hpp:281
MouseMoved event
The MouseMoved event that is about to be processed by the browser.
Definition browser_delegates.hpp:290
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:285
The BrowserDelegates::onMoveMouseWheel action arguments.
Definition browser_delegates.hpp:314
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:318
MouseWheel event
The MouseWheel event that is about to be processed by the browser.
Definition browser_delegates.hpp:323
The BrowserDelegates::onOpenPopup action arguments.
Definition browser_delegates.hpp:514
float scale_factor
The scale factor of the display where the parent browser window initiated this action is displayed.
Definition browser_delegates.hpp:548
std::string target_url
The target URL that will be loaded in the popup.
Definition browser_delegates.hpp:533
Rect initial_bounds
The initial bounds of the popup.
Definition browser_delegates.hpp:542
std::string target_name
The window target name.
Definition browser_delegates.hpp:528
std::shared_ptr< Browser > browser
The browser instance initiated this action.
Definition browser_delegates.hpp:518
std::shared_ptr< Browser > popup_browser
The browser instance of the created popup.
Definition browser_delegates.hpp:523
The BrowserDelegates::onPressKey action arguments.
Definition browser_delegates.hpp:415
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:419
KeyPressed event
The KeyPressed event that is about to be processed by the browser.
Definition browser_delegates.hpp:424
The BrowserDelegates::onPressMouse action arguments.
Definition browser_delegates.hpp:348
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:352
MousePressed event
The MousePressed event that is about to be processed by the browser.
Definition browser_delegates.hpp:357
The BrowserDelegates::onPrompt action arguments.
Definition browser_delegates.hpp:732
std::string title
The localized dialog title.
Definition browser_delegates.hpp:741
std::string message
The text passed to the window.prompt() JavaScript function.
Definition browser_delegates.hpp:746
std::shared_ptr< Browser > browser
The browser instance initiated this action.
Definition browser_delegates.hpp:736
std::string ok_action_text
The localized text of the "Ok" action.
Definition browser_delegates.hpp:751
std::string cancel_action_text
The localized text of the "Cancel" action.
Definition browser_delegates.hpp:756
A rectangle described by the location and dimensions.
Definition geometry.hpp:75
The BrowserDelegates::onReleaseKey action arguments.
Definition browser_delegates.hpp:448
KeyReleased event
The KeyReleased event that is about to be processed by the browser.
Definition browser_delegates.hpp:457
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:452
The BrowserDelegates::onReleaseMouse action arguments.
Definition browser_delegates.hpp:381
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:385
MouseReleased event
The MouseReleased event that is about to be processed by the browser.
Definition browser_delegates.hpp:390
The BrowserDelegates::onRequestPdfPassword action arguments.
Definition browser_delegates.hpp:1190
std::shared_ptr< Frame > frame
The frame containing the encrypted PDF document.
Definition browser_delegates.hpp:1199
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:1194
std::string url
The URL of the encrypted PDF document.
Definition browser_delegates.hpp:1204
The BrowserDelegates::onSaveAsPdf action arguments.
Definition browser_delegates.hpp:900
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:915
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:904
std::string suggested_file_name
The suggested name of the target PDF file.
Definition browser_delegates.hpp:909
The BrowserDelegates::onSaveCreditCard action arguments.
Definition browser_delegates.hpp:1306
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:1310
CreditCard credit_card
The credit card information entered in the web form.
Definition browser_delegates.hpp:1315
The BrowserDelegates::onSavePassword action arguments.
Definition browser_delegates.hpp:1034
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:1038
std::string login
The login value passed in the form.
Definition browser_delegates.hpp:1048
std::string url
The URL of the resource where the form is located.
Definition browser_delegates.hpp:1043
The BrowserDelegates::onSaveUserProfile action arguments.
Definition browser_delegates.hpp:1347
UserProfile user_profile
The user data entered in the web form.
Definition browser_delegates.hpp:1356
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:1351
The BrowserDelegates::onShowContextMenu action arguments.
Definition browser_delegates.hpp:567
std::string link_text
The text associated with the link.
Definition browser_delegates.hpp:581
std::string page_url
The source URL of the top level page that the context menu is invoked on.
Definition browser_delegates.hpp:591
ContextMenuContentType content_type
The content type of the node the context menu is invoked on.
Definition browser_delegates.hpp:606
std::string src_url
The source URL of the HTML element that the context menu is invoked on.
Definition browser_delegates.hpp:586
std::string link_url
The URL of the link that encloses the node the context menu is invoked on.
Definition browser_delegates.hpp:576
std::string frame_url
The URL of the sub-frame that the context menu is invoked on.
Definition browser_delegates.hpp:596
std::string selected_text
The text of the selection that the context menu is invoked on.
Definition browser_delegates.hpp:601
std::shared_ptr< Browser > browser
The browser instance initiated this action.
Definition browser_delegates.hpp:571
The BrowserDelegates::onStartCaptureSession action arguments.
Definition browser_delegates.hpp:1241
bool audio_capture_requested
Indicates if the page requests audio capture as well as the video content.
Definition browser_delegates.hpp:1265
CaptureSources sources
The available capture sources.
Definition browser_delegates.hpp:1260
std::string url
The URL of the web page.
Definition browser_delegates.hpp:1255
std::shared_ptr< Frame > frame
The frame starting the capture session.
Definition browser_delegates.hpp:1250
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:1245
The BrowserDelegates::onStartDownload action arguments.
Definition browser_delegates.hpp:980
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:994
std::shared_ptr< Download > download
The download activity instance.
Definition browser_delegates.hpp:999
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:984
The BrowserDelegates::onTypeKey action arguments.
Definition browser_delegates.hpp:481
KeyTyped event
The KeyTyped event that is about to be processed by the browser.
Definition browser_delegates.hpp:490
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:485
The BrowserDelegates::onUpdatePassword action arguments.
Definition browser_delegates.hpp:1087
std::string login
The login value passed in the form.
Definition browser_delegates.hpp:1101
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:1091
std::string url
The URL of the resource where the form is located.
Definition browser_delegates.hpp:1096
The BrowserDelegates::onUpdateUserProfile action arguments.
Definition browser_delegates.hpp:1388
UserProfile user_profile
The new user data entered in the web form.
Definition browser_delegates.hpp:1397
UserProfile original_user_profile
The original user data that is about to update.
Definition browser_delegates.hpp:1402
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:1392
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:160
std::vector< CertVerificationError > verification_errors
The list of errors found by the default SSL certificate verifier.
Definition browser_delegates.hpp:185
std::vector< Certificate > intermediate_certs
The list of intermediate certificates in the chain of the validated certificate.
Definition browser_delegates.hpp:180
std::shared_ptr< Browser > browser
The browser instance initiated this callback.
Definition browser_delegates.hpp:164
std::string host
The host name of the SSL server that requests the certificate verification.
Definition browser_delegates.hpp:169
Certificate certificate
The certificate that is requested to be verified.
Definition browser_delegates.hpp:174