Delete cef_web_plugin.h and plugin-related APIs (see issue #3047)

This functionality stopped being relevant after the removal of Flash support
in January 2021. The last remaining PPAPI plugin (PDF viewer) will switch to
a non-plugin implementation (PdfUnseasoned) in M100.
This commit is contained in:
Marshall Greenblatt
2022-02-18 15:43:30 -05:00
parent dc0a45d429
commit 28c7f04001
61 changed files with 59 additions and 1760 deletions

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=fa45e2603966fc7a6c93c930dd4c03692cf10fd2$
// $hash=4e9587e1eaf8aef5f0457537b70ebcc3ee68c449$
//
#include "libcef_dll/cpptoc/request_handler_cpptoc.h"
@@ -329,31 +329,6 @@ int CEF_CALLBACK request_handler_on_select_client_certificate(
return _retval;
}
void CEF_CALLBACK
request_handler_on_plugin_crashed(struct _cef_request_handler_t* self,
cef_browser_t* browser,
const cef_string_t* plugin_path) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: plugin_path; type: string_byref_const
DCHECK(plugin_path);
if (!plugin_path)
return;
// Execute
CefRequestHandlerCppToC::Get(self)->OnPluginCrashed(
CefBrowserCToCpp::Wrap(browser), CefString(plugin_path));
}
void CEF_CALLBACK
request_handler_on_render_view_ready(struct _cef_request_handler_t* self,
cef_browser_t* browser) {
@@ -429,7 +404,6 @@ CefRequestHandlerCppToC::CefRequestHandlerCppToC() {
GetStruct()->on_certificate_error = request_handler_on_certificate_error;
GetStruct()->on_select_client_certificate =
request_handler_on_select_client_certificate;
GetStruct()->on_plugin_crashed = request_handler_on_plugin_crashed;
GetStruct()->on_render_view_ready = request_handler_on_render_view_ready;
GetStruct()->on_render_process_terminated =
request_handler_on_render_process_terminated;

View File

@@ -1,121 +0,0 @@
// Copyright (c) 2022 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=f251bc08b09854c1d999ef9d88706ceeba3a9259$
//
#include "libcef_dll/cpptoc/web_plugin_info_cpptoc.h"
#include "libcef_dll/shutdown_checker.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
cef_string_userfree_t CEF_CALLBACK
web_plugin_info_get_name(struct _cef_web_plugin_info_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefWebPluginInfoCppToC::Get(self)->GetName();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK
web_plugin_info_get_path(struct _cef_web_plugin_info_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefWebPluginInfoCppToC::Get(self)->GetPath();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK
web_plugin_info_get_version(struct _cef_web_plugin_info_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefWebPluginInfoCppToC::Get(self)->GetVersion();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK
web_plugin_info_get_description(struct _cef_web_plugin_info_t* self) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefWebPluginInfoCppToC::Get(self)->GetDescription();
// Return type: string
return _retval.DetachToUserFree();
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefWebPluginInfoCppToC::CefWebPluginInfoCppToC() {
GetStruct()->get_name = web_plugin_info_get_name;
GetStruct()->get_path = web_plugin_info_get_path;
GetStruct()->get_version = web_plugin_info_get_version;
GetStruct()->get_description = web_plugin_info_get_description;
}
// DESTRUCTOR - Do not edit by hand.
CefWebPluginInfoCppToC::~CefWebPluginInfoCppToC() {
shutdown_checker::AssertNotShutdown();
}
template <>
CefRefPtr<CefWebPluginInfo> CefCppToCRefCounted<
CefWebPluginInfoCppToC,
CefWebPluginInfo,
cef_web_plugin_info_t>::UnwrapDerived(CefWrapperType type,
cef_web_plugin_info_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return nullptr;
}
template <>
CefWrapperType CefCppToCRefCounted<CefWebPluginInfoCppToC,
CefWebPluginInfo,
cef_web_plugin_info_t>::kWrapperType =
WT_WEB_PLUGIN_INFO;

View File

@@ -1,40 +0,0 @@
// Copyright (c) 2022 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=6b84c31a12d45d8707befeb476e6977f59c3e6e2$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_CPPTOC_H_
#pragma once
#if !defined(BUILDING_CEF_SHARED)
#error This file can be included DLL-side only
#endif
#include "include/capi/cef_browser_capi.h"
#include "include/capi/cef_web_plugin_capi.h"
#include "include/cef_browser.h"
#include "include/cef_web_plugin.h"
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed DLL-side only.
class CefWebPluginInfoCppToC
: public CefCppToCRefCounted<CefWebPluginInfoCppToC,
CefWebPluginInfo,
cef_web_plugin_info_t> {
public:
CefWebPluginInfoCppToC();
virtual ~CefWebPluginInfoCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_CPPTOC_H_

View File

@@ -1,78 +0,0 @@
// Copyright (c) 2022 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=df08a3fe475bba8107cfc45af61a31c4d0295014$
//
#include "libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h"
#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK
web_plugin_info_visitor_visit(struct _cef_web_plugin_info_visitor_t* self,
cef_web_plugin_info_t* info,
int count,
int total) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: info; type: refptr_diff
DCHECK(info);
if (!info)
return 0;
// Execute
bool _retval = CefWebPluginInfoVisitorCppToC::Get(self)->Visit(
CefWebPluginInfoCToCpp::Wrap(info), count, total);
// Return type: bool
return _retval;
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefWebPluginInfoVisitorCppToC::CefWebPluginInfoVisitorCppToC() {
GetStruct()->visit = web_plugin_info_visitor_visit;
}
// DESTRUCTOR - Do not edit by hand.
CefWebPluginInfoVisitorCppToC::~CefWebPluginInfoVisitorCppToC() {
shutdown_checker::AssertNotShutdown();
}
template <>
CefRefPtr<CefWebPluginInfoVisitor> CefCppToCRefCounted<
CefWebPluginInfoVisitorCppToC,
CefWebPluginInfoVisitor,
cef_web_plugin_info_visitor_t>::UnwrapDerived(CefWrapperType type,
cef_web_plugin_info_visitor_t*
s) {
NOTREACHED() << "Unexpected class type: " << type;
return nullptr;
}
template <>
CefWrapperType
CefCppToCRefCounted<CefWebPluginInfoVisitorCppToC,
CefWebPluginInfoVisitor,
cef_web_plugin_info_visitor_t>::kWrapperType =
WT_WEB_PLUGIN_INFO_VISITOR;

View File

@@ -1,40 +0,0 @@
// Copyright (c) 2022 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=5d5192e483c62143bf6b16ee292fe5e5f471e198$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
#error This file can be included wrapper-side only
#endif
#include "include/capi/cef_browser_capi.h"
#include "include/capi/cef_web_plugin_capi.h"
#include "include/cef_browser.h"
#include "include/cef_web_plugin.h"
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefWebPluginInfoVisitorCppToC
: public CefCppToCRefCounted<CefWebPluginInfoVisitorCppToC,
CefWebPluginInfoVisitor,
cef_web_plugin_info_visitor_t> {
public:
CefWebPluginInfoVisitorCppToC();
virtual ~CefWebPluginInfoVisitorCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_

View File

@@ -1,72 +0,0 @@
// Copyright (c) 2022 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=42ed9f3aa6aef7580eabb0a94981f1b7b5760d16$
//
#include "libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h"
#include "libcef_dll/shutdown_checker.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK web_plugin_unstable_callback_is_unstable(
struct _cef_web_plugin_unstable_callback_t* self,
const cef_string_t* path,
int unstable) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: path; type: string_byref_const
DCHECK(path);
if (!path)
return;
// Execute
CefWebPluginUnstableCallbackCppToC::Get(self)->IsUnstable(
CefString(path), unstable ? true : false);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefWebPluginUnstableCallbackCppToC::CefWebPluginUnstableCallbackCppToC() {
GetStruct()->is_unstable = web_plugin_unstable_callback_is_unstable;
}
// DESTRUCTOR - Do not edit by hand.
CefWebPluginUnstableCallbackCppToC::~CefWebPluginUnstableCallbackCppToC() {
shutdown_checker::AssertNotShutdown();
}
template <>
CefRefPtr<CefWebPluginUnstableCallback>
CefCppToCRefCounted<CefWebPluginUnstableCallbackCppToC,
CefWebPluginUnstableCallback,
cef_web_plugin_unstable_callback_t>::
UnwrapDerived(CefWrapperType type, cef_web_plugin_unstable_callback_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return nullptr;
}
template <>
CefWrapperType
CefCppToCRefCounted<CefWebPluginUnstableCallbackCppToC,
CefWebPluginUnstableCallback,
cef_web_plugin_unstable_callback_t>::kWrapperType =
WT_WEB_PLUGIN_UNSTABLE_CALLBACK;

View File

@@ -1,40 +0,0 @@
// Copyright (c) 2022 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.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=35a890b3dfa88746ee48ed0c94f351098213d163$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
#error This file can be included wrapper-side only
#endif
#include "include/capi/cef_browser_capi.h"
#include "include/capi/cef_web_plugin_capi.h"
#include "include/cef_browser.h"
#include "include/cef_web_plugin.h"
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefWebPluginUnstableCallbackCppToC
: public CefCppToCRefCounted<CefWebPluginUnstableCallbackCppToC,
CefWebPluginUnstableCallback,
cef_web_plugin_unstable_callback_t> {
public:
CefWebPluginUnstableCallbackCppToC();
virtual ~CefWebPluginUnstableCallbackCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_