chromium/content/web_test/renderer/test_plugin.h

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/342213636): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#ifndef CONTENT_WEB_TEST_RENDERER_TEST_PLUGIN_H_
#define CONTENT_WEB_TEST_RENDERER_TEST_PLUGIN_H_

#include <memory>
#include <string>

#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "cc/layers/texture_layer.h"
#include "cc/layers/texture_layer_client.h"
#include "cc/resources/shared_bitmap_id_registrar.h"
#include "gpu/command_buffer/common/mailbox.h"
#include "gpu/command_buffer/common/sync_token.h"
#include "third_party/blink/public/mojom/input/focus_type.mojom-forward.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_element.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_plugin.h"
#include "third_party/blink/public/web/web_plugin_container.h"
#include "third_party/khronos/GLES2/gl2.h"

namespace blink {
class WebGraphicsContext3DProvider;
struct WebPluginParams;
}  // namespace blink

namespace cc {
class CrossThreadSharedBitmap;
}

namespace gpu {

class ClientSharedImage;
class ClientSharedImageInterface;

namespace gles2 {
class GLES2Interface;
}
}  // namespace gpu

namespace viz {
struct TransferableResource;
}

namespace content {
class TestRunner;

// A fake implementation of blink::WebPlugin for testing purposes.
//
// It uses GL to paint a scene consisiting of a primitive over a background. The
// primitive and background can be customized using the following plugin
// parameters.
// primitive: none (default), triangle.
// background-color: black (default), red, green, blue.
// primitive-color: black (default), red, green, blue.
// opacity: [0.0 - 1.0]. Default is 1.0.
//
// Whether the plugin accepts touch events or not can be customized using the
// 'accepts-touch' plugin parameter (defaults to false).
class TestPlugin : public blink::WebPlugin, public cc::TextureLayerClient {};

}  // namespace content

#endif  // CONTENT_WEB_TEST_RENDERER_TEST_PLUGIN_H_