2023-02-17 21:55:12 +01:00
|
|
|
// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_TESTS_CEFCLIENT_BROWSER_DEFAULT_CLIENT_HANDLER_H_
|
|
|
|
#define CEF_TESTS_CEFCLIENT_BROWSER_DEFAULT_CLIENT_HANDLER_H_
|
|
|
|
#pragma once
|
|
|
|
|
2024-03-12 20:47:10 +01:00
|
|
|
#include "tests/cefclient/browser/base_client_handler.h"
|
2023-02-17 21:55:12 +01:00
|
|
|
|
|
|
|
namespace client {
|
|
|
|
|
2024-06-26 02:12:37 +02:00
|
|
|
// Default client handler for unmanaged browser windows. Used with Chrome
|
|
|
|
// style only.
|
2024-03-12 20:47:10 +01:00
|
|
|
class DefaultClientHandler : public BaseClientHandler {
|
2023-02-17 21:55:12 +01:00
|
|
|
public:
|
2024-03-12 20:47:10 +01:00
|
|
|
DefaultClientHandler() = default;
|
2023-02-17 21:55:12 +01:00
|
|
|
|
2024-08-06 00:30:39 +02:00
|
|
|
// Returns the DefaultClientHandler for |client|, or nullptr if |client| is
|
|
|
|
// not a DefaultClientHandler.
|
|
|
|
static CefRefPtr<DefaultClientHandler> GetForClient(
|
|
|
|
CefRefPtr<CefClient> client);
|
|
|
|
|
2023-02-17 21:55:12 +01:00
|
|
|
private:
|
2024-08-06 00:30:39 +02:00
|
|
|
// Used to determine the object type.
|
|
|
|
virtual const void* GetTypeKey() const override { return &kTypeKey; }
|
2024-08-07 17:30:07 +02:00
|
|
|
static constexpr int kTypeKey = 0;
|
2024-08-06 00:30:39 +02:00
|
|
|
|
2023-02-17 21:55:12 +01:00
|
|
|
IMPLEMENT_REFCOUNTING(DefaultClientHandler);
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(DefaultClientHandler);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace client
|
|
|
|
|
|
|
|
#endif // CEF_TESTS_CEFCLIENT_BROWSER_DEFAULT_CLIENT_HANDLER_H_
|