Merge pull request #9111 from electron/deliver-ipc-messages-to-handlers
Fix printing on Windows
This commit is contained in:
commit
d857b71557
3 changed files with 15 additions and 0 deletions
|
@ -19,4 +19,16 @@ AtomContentUtilityClient::AtomContentUtilityClient() {
|
||||||
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
|
} // namespace atom
|
||||||
|
|
|
@ -20,6 +20,8 @@ class AtomContentUtilityClient : public content::ContentUtilityClient {
|
||||||
AtomContentUtilityClient();
|
AtomContentUtilityClient();
|
||||||
~AtomContentUtilityClient() override;
|
~AtomContentUtilityClient() override;
|
||||||
|
|
||||||
|
bool OnMessageReceived(const IPC::Message& message) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
typedef ScopedVector<UtilityMessageHandler> Handlers;
|
typedef ScopedVector<UtilityMessageHandler> Handlers;
|
||||||
|
|
|
@ -159,6 +159,7 @@ void PrintViewManagerBase::OnDidPrintPage(
|
||||||
|
|
||||||
ShouldQuitFromInnerMessageLoop();
|
ShouldQuitFromInnerMessageLoop();
|
||||||
#else
|
#else
|
||||||
|
print_job_->AppendPrintedPage(params.page_number);
|
||||||
if (metafile_must_be_valid) {
|
if (metafile_must_be_valid) {
|
||||||
bool print_text_with_gdi =
|
bool print_text_with_gdi =
|
||||||
document->settings().print_text_with_gdi() &&
|
document->settings().print_text_with_gdi() &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue