MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / Hooked_CefBrowserHost_CreateBrowser

Function Hooked_CefBrowserHost_CreateBrowser

core/src/browser/browser.cc:103–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101
102static hook::Hook<decltype(&cef_browser_host_create_browser)> CefBrowserHost_CreateBrowser;
103static int Hooked_CefBrowserHost_CreateBrowser(
104 const cef_window_info_t* windowInfo,
105 struct _cef_client_t* client,
106 const cef_string_t* url,
107 const struct _cef_browser_settings_t* settings,
108 struct _cef_dictionary_value_t* extra_info,
109 struct _cef_request_context_t* request_context)
110{
111 auto &url_ = CefStr::borrow(url);
112
113 // Hook main browser only.
114 if (url_.startw("https://riot:") && url_.endw("/bootstrap.html"))
115 {
116 // Create extra info if null.
117 if (extra_info == nullptr)
118 extra_info = cef_dictionary_value_create();
119
120 // Set as main browser.
121 extra_info->set_null(extra_info, &u"is_main"_s);
122
123 // Hook client.
124 HookMainBrowserClient(client);
125 }
126
127 return CefBrowserHost_CreateBrowser(windowInfo, client, url, settings, extra_info, request_context);
128}
129
130static decltype(cef_app_t::on_before_command_line_processing) OnBeforeCommandLineProcessing;
131static void CEF_CALLBACK Hooked_OnBeforeCommandLineProcessing(

Callers

nothing calls this directly

Calls 3

HookMainBrowserClientFunction · 0.85
startwMethod · 0.80
endwMethod · 0.80

Tested by

no test coverage detected