Merge pull request #9111 from electron/deliver-ipc-messages-to-handlers

Fix printing on Windows
This commit is contained in:
Kevin Sawicki 2017-04-05 16:27:58 -07:00 committed by GitHub
commit d857b71557
3 changed files with 15 additions and 0 deletions

View file

@ -19,4 +19,16 @@ AtomContentUtilityClient::AtomContentUtilityClient() {
AtomContentUtilityClient::~AtomContentUtilityClient() {
}
bool AtomContentUtilityClient::OnMessageReceived(
const IPC::Message& message) {
#if defined(OS_WIN)
for (auto* handler : handlers_) {
if (handler->OnMessageReceived(message))
return true;
}
#endif
return false;
}
} // namespace atom

View file

@ -20,6 +20,8 @@ class AtomContentUtilityClient : public content::ContentUtilityClient {
AtomContentUtilityClient();
~AtomContentUtilityClient() override;
bool OnMessageReceived(const IPC::Message& message) override;
private:
#if defined(OS_WIN)
typedef ScopedVector<UtilityMessageHandler> Handlers;

View file

@ -159,6 +159,7 @@ void PrintViewManagerBase::OnDidPrintPage(
ShouldQuitFromInnerMessageLoop();
#else
print_job_->AppendPrintedPage(params.page_number);
if (metafile_must_be_valid) {
bool print_text_with_gdi =
document->settings().print_text_with_gdi() &&