Load pdf component dynamically.
Ship pdf as dll library, electron only loads pdf.dll when calling print API. In this way, the developer who don't need print feature can safe remove the pdf.dll in saving their binary size.
This commit is contained in:
parent
30d815e28f
commit
abd97a7513
5 changed files with 118 additions and 3 deletions
|
@ -64,6 +64,12 @@ void AtomMainDelegate::PreSandboxStartup() {
|
|||
std::string process_type = command_line->GetSwitchValueASCII(
|
||||
switches::kProcessType);
|
||||
|
||||
#if defined(OS_WIN)
|
||||
if (process_type == switches::kUtilityProcess) {
|
||||
AtomContentUtilityClient::PreSandboxStartup();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Only append arguments for browser process.
|
||||
if (!process_type.empty())
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue