build: [gn] COMPONENT_EXPORT some pepper flash classes (#664)

* build: [gn] COMPONENT_EXPORT some pepper flash classes

* build: [gyp] convert pepper_flash target into a component
This commit is contained in:
Robo 2018-08-28 19:54:29 +05:30 коммит произвёл Alexey Kuzmin
Родитель 99c3a9966a
Коммит 5db50d4918
3 изменённых файлов: 50 добавлений и 2 удалений

Просмотреть файл

@ -434,7 +434,8 @@ if (is_electron_build && !is_component_build) {
}
static_library("pepper_flash") {
component("pepper_flash") {
defines = [ "IS_PEPPER_FLASH_IMPL" ]
sources = [
"//chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc",
"//chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h",
@ -466,6 +467,8 @@ static_library("pepper_flash") {
"//chrome/renderer/pepper/pepper_shared_memory_message_filter.h",
]
deps = [
"//content/public/browser",
"//content/public/renderer",
"//media:media_features",
"//ppapi/host",
"//ppapi/proxy",
@ -474,7 +477,7 @@ static_library("pepper_flash") {
"//services/device/public/mojom",
"//skia",
"//third_party/adobe/flash:flapper_version_h",
"//third_party/WebKit/public:blink",
"//ui/base",
]
if (is_mac) {
sources += [

Просмотреть файл

@ -29,6 +29,28 @@ index a5ea92f28784..5fd8f4525f83 100644
}
}
diff --git a/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h b/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h
index 735da93c3cab..533f53fbc423 100644
--- a/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h
+++ b/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_CHROME_BROWSER_PEPPER_HOST_FACTORY_H_
#define CHROME_BROWSER_RENDERER_HOST_PEPPER_CHROME_BROWSER_PEPPER_HOST_FACTORY_H_
+#include "base/component_export.h"
#include "base/macros.h"
#include "ppapi/host/host_factory.h"
@@ -12,7 +13,8 @@ namespace content {
class BrowserPpapiHost;
} // namespace content
-class ChromeBrowserPepperHostFactory : public ppapi::host::HostFactory {
+class COMPONENT_EXPORT(PEPPER_FLASH) ChromeBrowserPepperHostFactory
+ : public ppapi::host::HostFactory {
public:
// Non-owning pointer to the filter must outlive this class.
explicit ChromeBrowserPepperHostFactory(content::BrowserPpapiHost* host);
diff --git a/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc
index f4f1741a8ecf..103238cdd53f 100644
--- a/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc
@ -449,3 +471,23 @@ index 66a532e2cb41..e776d0e96c4a 100644
+#endif
+ return PP_ERROR_FAILED;
}
diff --git a/chrome/renderer/pepper/pepper_helper.h b/chrome/renderer/pepper/pepper_helper.h
index e021c964da3d..e035f0fb9e2b 100644
--- a/chrome/renderer/pepper/pepper_helper.h
+++ b/chrome/renderer/pepper/pepper_helper.h
@@ -6,12 +6,14 @@
#define CHROME_RENDERER_PEPPER_PEPPER_HELPER_H_
#include "base/compiler_specific.h"
+#include "base/component_export.h"
#include "base/macros.h"
#include "content/public/renderer/render_frame_observer.h"
// This class listens for Pepper creation events from the RenderFrame and
// attaches the parts required for Chrome-specific plugin support.
-class PepperHelper : public content::RenderFrameObserver {
+class COMPONENT_EXPORT(PEPPER_FLASH) PepperHelper
+ : public content::RenderFrameObserver {
public:
explicit PepperHelper(content::RenderFrame* render_frame);
~PepperHelper() override;

Просмотреть файл

@ -26,9 +26,11 @@ STATIC_LIBRARY_SUFFIX = {
EXCLUDE_SHARED_LIBRARIES = {
'darwin': [
'libpepper_flash.dylib',
'libwidevinecdm.dylib',
],
'linux': [
'libpepper_flash.so',
'libwidevinecdm.so',
'libwidevinecdmadapter.so',
],
@ -36,6 +38,7 @@ EXCLUDE_SHARED_LIBRARIES = {
'd3dcompiler_47.dll',
'libEGL.dll',
'libGLESv2.dll',
'pepper_flash.dll',
'widevinecdm.dll',
'widevinecdmadapter.dll',
],