Add component build support (issue #1617)

This commit is contained in:
Marshall Greenblatt
2017-07-06 16:39:37 -04:00
parent c080187908
commit b216f427f6
17 changed files with 325 additions and 144 deletions

View File

@@ -0,0 +1,47 @@
diff --git content/app/content_service_manager_main_delegate.h content/app/content_service_manager_main_delegate.h
index c0fd31d..9e95dbb 100644
--- content/app/content_service_manager_main_delegate.h
+++ content/app/content_service_manager_main_delegate.h
@@ -16,7 +16,8 @@ namespace content {
class ContentMainRunner;
-class ContentServiceManagerMainDelegate : public service_manager::MainDelegate {
+class CONTENT_EXPORT ContentServiceManagerMainDelegate :
+ public service_manager::MainDelegate {
public:
explicit ContentServiceManagerMainDelegate(const ContentMainParams& params);
~ContentServiceManagerMainDelegate() override;
diff --git content/browser/frame_host/debug_urls.h content/browser/frame_host/debug_urls.h
index 413cd0f..bab8a6d 100644
--- content/browser/frame_host/debug_urls.h
+++ content/browser/frame_host/debug_urls.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_DEBUG_URLS_H_
#define CONTENT_BROWSER_FRAME_HOST_DEBUG_URLS_H_
+#include "content/common/content_export.h"
#include "ui/base/page_transition_types.h"
class GURL;
@@ -19,7 +20,7 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition);
// renderer process, such as one that crashes or hangs the renderer, or a
// javascript: URL that operates on the current page in the renderer. Such URLs
// do not represent actual navigations and can be loaded in any SiteInstance.
-bool IsRendererDebugURL(const GURL& url);
+CONTENT_EXPORT bool IsRendererDebugURL(const GURL& url);
} // namespace content
diff --git third_party/WebKit/Source/web/BUILD.gn third_party/WebKit/Source/web/BUILD.gn
index 4424844..f72486f 100644
--- third_party/WebKit/Source/web/BUILD.gn
+++ third_party/WebKit/Source/web/BUILD.gn
@@ -15,6 +15,7 @@ component("web") {
output_name = "blink_web"
deps = [
+ "//cef:webkit_set",
"//skia",
"//third_party/WebKit/Source/core",
"//third_party/WebKit/Source/modules",

View File

@@ -113,7 +113,7 @@ index 93fb0b0..3e543d2 100644
// on the given |command_line|.
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
index c8197e9..21ad726 100644
index c8197e9..06adc24 100644
--- chrome_elf/BUILD.gn
+++ chrome_elf/BUILD.gn
@@ -7,6 +7,7 @@
@@ -124,7 +124,7 @@ index c8197e9..21ad726 100644
import("//chrome/process_version_rc_template.gni")
import("//testing/test.gni")
@@ -137,16 +138,40 @@ static_library("blacklist") {
@@ -137,16 +138,15 @@ static_library("blacklist") {
static_library("crash") {
sources = [
@@ -134,31 +134,6 @@ index c8197e9..21ad726 100644
"crash/crash_helper.cc",
"crash/crash_helper.h",
]
+
+ if (enable_cef) {
+ sources += [
+ "//cef/libcef/common/crash_reporter_client.cc",
+ "//cef/libcef/common/crash_reporter_client.h",
+
+ # Required for crash_keys::GetChromeCrashKeys.
+ # Otherwise we need to copy this array into CEF, which would be difficult
+ # to maintain.
+ "//chrome/common/crash_keys.cc",
+ "//chrome/common/chrome_switches.cc",
+ "//components/flags_ui/flags_ui_switches.cc",
+ "//content/public/common/content_switches.cc",
+ "//gpu/config/gpu_crash_keys.cc",
+ ]
+ include_dirs = [
+ "//cef",
+ ]
+ } else {
+ sources += [
+ "//chrome/app/chrome_crash_reporter_client_win.cc",
+ "//chrome/app/chrome_crash_reporter_client_win.h",
+ "//chrome/common/chrome_result_codes.h",
+ ]
+ }
+
deps = [
":hook_util",
@@ -168,6 +143,24 @@ index c8197e9..21ad726 100644
"//chrome/install_static:install_static_util",
"//components/crash/content/app:app",
"//components/crash/core/common", # crash_keys
@@ -154,6 +154,17 @@ static_library("crash") {
"//content/public/common:result_codes",
"//third_party/crashpad/crashpad/client:client", # DumpWithoutCrash
]
+
+ if (enable_cef) {
+ deps += [ "//cef:chrome_elf_set" ]
+ include_dirs = [ "//cef" ]
+ } else {
+ sources += [
+ "//chrome/app/chrome_crash_reporter_client_win.cc",
+ "//chrome/app/chrome_crash_reporter_client_win.h",
+ "//chrome/common/chrome_result_codes.h",
+ ]
+ }
}
static_library("hook_util") {
diff --git chrome_elf/crash/crash_helper.cc chrome_elf/crash/crash_helper.cc
index c658fa9..8c4a145 100644
--- chrome_elf/crash/crash_helper.cc

View File

@@ -62,14 +62,14 @@ index 141a083..b16b4d6 100644
ResourceContext* resource_context = browser_context->GetResourceContext();
diff --git content/browser/resource_context_impl.h content/browser/resource_context_impl.h
index 903cc54..56ee4ea 100644
index 903cc54..5bd30ae 100644
--- content/browser/resource_context_impl.h
+++ content/browser/resource_context_impl.h
@@ -28,6 +28,8 @@ CONTENT_EXPORT StreamContext* GetStreamContextForResourceContext(
URLDataManagerBackend* GetURLDataManagerForResourceContext(
ResourceContext* context);
+const void* GetURLDataManagerBackendUserDataKey();
+CONTENT_EXPORT const void* GetURLDataManagerBackendUserDataKey();
+
// Initialize the above data on the ResourceContext from a given BrowserContext.
CONTENT_EXPORT void InitializeResourceContext(BrowserContext* browser_context);