diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-04-05 16:20:05 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-04-05 16:20:05 +0530 |
| commit | 09cdcd15b31469c839831cad534fec9896999b60 (patch) | |
| tree | 4aea664837807d06b2056c83191143fb9a8f3d54 /src/WindowActionRouter.hpp | |
| parent | c4413f3cca0a0750af9881276162b70f3489b499 (diff) | |
| download | null-browser-09cdcd15b31469c839831cad534fec9896999b60.tar.gz null-browser-09cdcd15b31469c839831cad534fec9896999b60.zip | |
Refactor event queue out of router
Diffstat (limited to 'src/WindowActionRouter.hpp')
| -rw-r--r-- | src/WindowActionRouter.hpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/WindowActionRouter.hpp b/src/WindowActionRouter.hpp index f7cb2b4..b72734c 100644 --- a/src/WindowActionRouter.hpp +++ b/src/WindowActionRouter.hpp @@ -4,11 +4,8 @@ #include <QtCore> #include <cstdint> #include <functional> -#include <mutex> -#include <string> -#include <unordered_map> -#include "events.hpp" +#include "EventQueue.hpp" #include "widgets/BrowserWindow.hpp" #include "widgets/WebViewStack.hpp" @@ -37,8 +34,8 @@ public: WebViewId fetch_current_tab_id(WindowId win_id = 0); QList<WebViewData> fetch_webview_data_list(WindowId win_id = 0); - void dispatch_event(BrowserEvent *event); - void register_event(const EventHandlerRequest &event); + DELEGATE((&event_queue), dispatch_event, dispatch_event); + DELEGATE((&event_queue), register_event, register_event) protected: WindowActionRouter() = default; @@ -54,7 +51,5 @@ private: uint64_t last_id = 1; Configuration *configuration; - // TODO: Split event handling to its own class - std::mutex events_mutex; - std::unordered_map<QString, std::vector<EventHandlerRequest>> events; + EventQueue event_queue; }; |
