cefclient: Fix invalid cast to ClientHandlerStd (see #3499)

This commit is contained in:
Marshall Greenblatt
2024-08-05 18:30:39 -04:00
parent f6f4ba8317
commit 166eec85e0
13 changed files with 95 additions and 7 deletions

View File

@@ -18,7 +18,15 @@ class ClientHandlerStd : public ClientHandler {
bool with_controls,
const std::string& startup_url);
// Returns the ClientHandlerStd for |client|, or nullptr if |client| is not a
// ClientHandlerStd.
static CefRefPtr<ClientHandlerStd> GetForClient(CefRefPtr<CefClient> client);
private:
// Used to determine the object type.
virtual const void* GetTypeKey() const override { return &kTypeKey; }
static const int kTypeKey = 0;
// Include the default reference counting implementation.
IMPLEMENT_REFCOUNTING(ClientHandlerStd);
DISALLOW_COPY_AND_ASSIGN(ClientHandlerStd);