Molybden API
Loading...
Searching...
No Matches
browser_events.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_EVENTS_HPP
6#define MOLYBDEN_BROWSER_EVENTS_HPP
7
8#include "molybden/base/event.hpp"
9#include "molybden/ui/bitmap.hpp"
10
11namespace molybden {
12
13class Frame;
14class Browser;
15class CaptureSession;
16
24 std::shared_ptr<Browser> browser;
25
29 std::string new_title;
30};
31
39 std::shared_ptr<Browser> browser;
40
44 std::string status_text;
45};
46
54 std::shared_ptr<Browser> browser;
55
59 std::shared_ptr<Frame> frame;
60};
61
69 std::shared_ptr<Browser> browser;
70
74 std::shared_ptr<Frame> frame;
75};
76
80enum class ConsoleMessageLevel {
81 kUnspecified,
82 kDebug,
83 kLog,
84 kWarning,
85 kLevelError,
86 kVerbose
87};
88
96 std::shared_ptr<Browser> browser;
97
101 ConsoleMessageLevel level;
102
106 std::string message;
107
111 uint64_t line_number;
112
116 std::string source;
117};
118
126 std::shared_ptr<Browser> browser;
127};
128
136 std::shared_ptr<Browser> browser;
137};
138
146 std::shared_ptr<Browser> browser;
147};
148
152enum class TerminationStatus {
153 kUnspecified,
154 kNormalTermination,
155 kAbnormalTermination,
156 kProcessWasKilled,
157 kProcessCrashed,
158 kStillRunning,
159 kLaunchFailed,
160 kOom,
161};
162
170 std::shared_ptr<Browser> browser;
171
175 TerminationStatus status;
176
180 int32_t exit_code;
181};
182
190 std::shared_ptr<Browser> browser;
191};
192
200 std::shared_ptr<Browser> browser;
201
205 std::shared_ptr<CaptureSession> session;
206};
207
217 uint32_t location = 0;
218
222 uint32_t length = 0;
223};
224
232 std::shared_ptr<Browser> browser;
233
237 std::shared_ptr<Frame> frame;
238
242 std::vector<SpellCheckingResult> results;
243};
244
248enum class MediaStreamType {
249 kUnspecified,
250
254 kAudio,
255
259 kVideo
260};
261
269 std::shared_ptr<Browser> browser;
270
274 MediaStreamType type;
275};
276
284 std::shared_ptr<Browser> browser;
285
289 MediaStreamType type;
290};
291
299 std::shared_ptr<Browser> browser;
300};
301
309 std::shared_ptr<Browser> browser;
310};
311
319 std::shared_ptr<Browser> browser;
320};
321
325struct FocusLost {
329 std::shared_ptr<Browser> browser;
330};
331
546
547} // namespace molybden
548
549#endif // MOLYBDEN_BROWSER_EVENTS_HPP
A class that contains all browser events.
Definition browser_events.hpp:335
Event< RenderProcessTerminated > onRenderProcessTerminated
Invoked when the Chromium render process has been terminated.
Definition browser_events.hpp:445
Event< FrameDeleted > onFrameDeleted
Invoked when a frame has been deleted.
Definition browser_events.hpp:385
Event< FocusGained > onFocusGained
Invoked when the browser has been focused.
Definition browser_events.hpp:533
Event< FocusLost > onFocusLost
Invoked when browser has lost focus.
Definition browser_events.hpp:544
Event< ConsoleMessageReceived > onConsoleMessageReceived
Invoked when a JavaScript console message has been received.
Definition browser_events.hpp:396
Event< CaptureSessionStarted > onCaptureSessionStarted
Invoked browser has started a capture session.
Definition browser_events.hpp:456
Event< MediaStreamCaptureStarted > onMediaStreamCaptureStarted
Invoked when a web page has started capturing an audio or video stream.
Definition browser_events.hpp:478
Event< FullScreenExited > onFullScreenExited
Invoked when browser has exited the full screen mode.
Definition browser_events.hpp:522
Event< SpellCheckCompleted > onSpellCheckCompleted
Invoked when spell checking on the frame has been completed.
Definition browser_events.hpp:467
Event< BrowserBecameUnresponsive > onBecameUnresponsive
Invoked when browser has become unresponsive.
Definition browser_events.hpp:423
Event< FrameCreated > onFrameCreated
Invoked when a new frame has been created.
Definition browser_events.hpp:370
Event< MediaStreamCaptureStopped > onMediaStreamCaptureStopped
Invoked when a web page has stopped capturing an audio or video stream.
Definition browser_events.hpp:489
Event< StatusChanged > onStatusChanged
Invoked when the status text has been changed.
Definition browser_events.hpp:359
Event< BrowserClosed > onBrowserClosed
Invoked when browser instance has been closed.
Definition browser_events.hpp:500
Event< FullScreenEntered > onFullScreenEntered
Invoked when browser has entered the full screen mode.
Definition browser_events.hpp:511
Event< RenderProcessStarted > onRenderProcessStarted
Invoked when a new Chromium render process has been started.
Definition browser_events.hpp:434
Event< TitleChanged > onTitleChanged
Invoked when the web page title has been changed.
Definition browser_events.hpp:348
Event< BrowserBecameResponsive > onBecameResponsive
Invoked when the browser has become responsive.
Definition browser_events.hpp:407
Events allow you to be notified when something happens in Molybden.
Definition event.hpp:25
The BrowserEvents::onBrowserBecameResponsive event arguments.
Definition browser_events.hpp:122
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:126
The BrowserEvents::onBrowserBecameUnresponsive event arguments.
Definition browser_events.hpp:132
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:136
The BrowserEvents::onBrowserClosed event arguments.
Definition browser_events.hpp:186
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:190
The BrowserEvents::onCaptureSessionStarted event arguments.
Definition browser_events.hpp:196
std::shared_ptr< CaptureSession > session
The started capture session.
Definition browser_events.hpp:205
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:200
The BrowserEvents::onConsoleMessageReceived event arguments.
Definition browser_events.hpp:92
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:96
std::string source
The source of the console message.
Definition browser_events.hpp:116
uint64_t line_number
The line number of the console message.
Definition browser_events.hpp:111
ConsoleMessageLevel level
The console message level.
Definition browser_events.hpp:101
std::string message
The console message text.
Definition browser_events.hpp:106
The BrowserEvents::onFocusGained event arguments.
Definition browser_events.hpp:315
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:319
The BrowserEvents::onFocusLost event arguments.
Definition browser_events.hpp:325
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:329
The BrowserEvents::onFrameCreated event arguments.
Definition browser_events.hpp:50
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:54
std::shared_ptr< Frame > frame
The created frame.
Definition browser_events.hpp:59
The BrowserEvents::onFrameDeleted event arguments.
Definition browser_events.hpp:65
std::shared_ptr< Frame > frame
The deleted frame.
Definition browser_events.hpp:74
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:69
The BrowserEvents::onFullScreenEntered event arguments.
Definition browser_events.hpp:295
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:299
The BrowserEvents::onFullScreenExited event arguments.
Definition browser_events.hpp:305
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:309
The BrowserEvents::onMediaStreamCaptureStarted event arguments.
Definition browser_events.hpp:265
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:269
MediaStreamType type
The type of the captured media stream.
Definition browser_events.hpp:274
The BrowserEvents::onMediaStreamCaptureStopped event arguments.
Definition browser_events.hpp:280
MediaStreamType type
The type of the captured media stream.
Definition browser_events.hpp:289
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:284
The BrowserEvents::onRenderProcessStarted event arguments.
Definition browser_events.hpp:142
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:146
The BrowserEvents::onRenderProcessTerminated event arguments.
Definition browser_events.hpp:166
int32_t exit_code
The exit code of the terminated render process.
Definition browser_events.hpp:180
TerminationStatus status
The termination status of the terminated render process.
Definition browser_events.hpp:175
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:170
The BrowserEvents::onSpellCheckCompleted event arguments.
Definition browser_events.hpp:228
std::vector< SpellCheckingResult > results
The list of the spell checking results.
Definition browser_events.hpp:242
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:232
std::shared_ptr< Frame > frame
The frame instance in which spell checking has been completed.
Definition browser_events.hpp:237
A spell checking result that contains the bounds of a mis-spelled substring of the checked text.
Definition browser_events.hpp:212
uint32_t location
The location of the first symbol in the mis-spelled word in the checked text that is considered as mi...
Definition browser_events.hpp:217
uint32_t length
The length of the mis-spelled word in the checked text.
Definition browser_events.hpp:222
The BrowserEvents::onStatusChanged event arguments.
Definition browser_events.hpp:35
std::string status_text
The new status text or an empty string if the status text is empty.
Definition browser_events.hpp:44
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:39
The BrowserEvents::onTitleChanged event arguments.
Definition browser_events.hpp:20
std::string new_title
The new title or an empty string if the new title is empty.
Definition browser_events.hpp:29
std::shared_ptr< Browser > browser
The browser instance initiated this event.
Definition browser_events.hpp:24