-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathevent_notify.h
More file actions
87 lines (75 loc) · 3.16 KB
/
Copy pathevent_notify.h
File metadata and controls
87 lines (75 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#pragma once
#include "base/memory/ref_counted.h"
#include "edgeview_data.h"
#include "ev_network.h"
#include "util.h"
namespace edgeview {
struct BrowserData;
struct NewWindowDelegate;
struct StrMapElement;
struct ScriptDialogDelegate;
struct ContextMenuParams;
struct ContextMenuItem;
struct PermissionDelegate;
struct BasicAuthenticationCallback;
struct DownloadConfirm;
struct FrameData;
class BrowserEventDispatcher : public base::RefCounted<BrowserEventDispatcher> {
public:
BrowserEventDispatcher(base::WeakPtr<BrowserData> browser, LPVOID callback);
~BrowserEventDispatcher();
BrowserEventDispatcher(const BrowserEventDispatcher&) = delete;
BrowserEventDispatcher& operator=(const BrowserEventDispatcher&) = delete;
void OnCreated();
void OnCloseRequested();
void OnNewWindowRequested(scoped_refptr<NewWindowDelegate> delegate);
void OnDocumentTitleChanged(LPCSTR title);
void OnFullscreenModeChanged(BOOL fullscreen);
BOOL OnBeforeNavigation(scoped_refptr<FrameData> frame,
LPCSTR url,
BOOL user_gesture,
BOOL is_redirect,
LPCSTR headers,
uint64_t nav_id);
void OnContentLoading(BOOL error_page, uint64_t nav_id);
void OnSourceChanged(BOOL new_document);
void OnHistoryChanged();
void OnNavigationComplete(scoped_refptr<FrameData> frame,
BOOL success,
int error_status,
uint64_t nav_id);
void OnScriptDialogRequested(LPCSTR url,
int kind,
LPCSTR message,
LPCSTR deftext,
scoped_refptr<ScriptDialogDelegate> delegate);
void OnContextMenuRequested(scoped_refptr<ContextMenuParams> params);
void OnContextMenuExecute(scoped_refptr<ContextMenuItem> item);
void OnPermissionRequested(LPCSTR url,
int kind,
BOOL user_gesture,
scoped_refptr<PermissionDelegate> delegate);
void OnResourceRequested(json request_parameter);
void OnResourceReceiveResponse(json request_parameter);
BOOL OnKeyEvent(COREWEBVIEW2_KEY_EVENT_KIND kind,
uint32_t virtual_key,
int lparam,
COREWEBVIEW2_PHYSICAL_KEY_STATUS* status);
void BasicAuthRequested(LPCSTR url,
LPCSTR challenge,
scoped_refptr<BasicAuthenticationCallback> callback);
void OnReceivedWebMessage(scoped_refptr<FrameData> frame,
LPCSTR source_url,
LPCSTR json_args);
void OnFileChooserRequested(LPCSTR frame_id, BOOL multiselect, int node_id);
void OnConsoleMessage(json console_event);
void OnBeforeDownload(scoped_refptr<DownloadConfirm> confirm);
void OnFaviconChanged(LPCSTR favicon);
void OnAudioStateChanged(BOOL audible);
void OnStatusTextChanged(LPCSTR status);
void OnProcessFailed(COREWEBVIEW2_PROCESS_FAILED_KIND kind);
private:
base::WeakPtr<BrowserData> self;
LPVOID ecallback = nullptr;
};
} // namespace edgeview