2017-06-15 17:27:56 +02:00
|
|
|
diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc
|
2022-08-23 03:37:40 +02:00
|
|
|
index f0d4596f0e953..1d4d659b2d785 100644
|
2017-06-15 17:27:56 +02:00
|
|
|
--- chrome/browser/printing/print_job_worker.cc
|
|
|
|
+++ chrome/browser/printing/print_job_worker.cc
|
2022-08-23 03:37:40 +02:00
|
|
|
@@ -130,6 +130,7 @@ PrintJobWorker::PrintJobWorker(content::GlobalRenderFrameHostId rfh_id)
|
2021-12-16 23:35:54 +01:00
|
|
|
ShouldPrintingContextSkipSystemCalls())),
|
2019-09-04 17:13:32 +02:00
|
|
|
thread_("Printing_Worker") {
|
2022-06-17 15:28:55 +02:00
|
|
|
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
2022-03-26 02:12:30 +01:00
|
|
|
+ printing_context_->set_render_ids(rfh_id.child_id, rfh_id.frame_routing_id);
|
2017-06-15 17:27:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PrintJobWorker::~PrintJobWorker() {
|
|
|
|
diff --git printing/printing_context.h printing/printing_context.h
|
2022-07-25 19:49:32 +02:00
|
|
|
index 0e6dd8092f602..4a173fcbc2e89 100644
|
2017-06-15 17:27:56 +02:00
|
|
|
--- printing/printing_context.h
|
|
|
|
+++ printing/printing_context.h
|
2022-05-19 12:28:44 +02:00
|
|
|
@@ -173,6 +173,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
|
2017-06-15 17:27:56 +02:00
|
|
|
|
|
|
|
int job_id() const { return job_id_; }
|
|
|
|
|
|
|
|
+ void set_render_ids(int render_process_id, int render_frame_id) {
|
|
|
|
+ render_process_id_ = render_process_id;
|
|
|
|
+ render_frame_id_ = render_frame_id;
|
|
|
|
+ }
|
|
|
|
+ int render_process_id() const { return render_process_id_; }
|
|
|
|
+ int render_frame_id() const { return render_frame_id_; }
|
|
|
|
+
|
|
|
|
protected:
|
|
|
|
explicit PrintingContext(Delegate* delegate);
|
|
|
|
|
2022-07-25 19:49:32 +02:00
|
|
|
@@ -219,6 +226,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
|
2017-06-15 17:27:56 +02:00
|
|
|
// The job id for the current job. The value is 0 if no jobs are active.
|
|
|
|
int job_id_;
|
2021-12-16 23:35:54 +01:00
|
|
|
|
2017-06-15 17:27:56 +02:00
|
|
|
+ // Routing IDs for the frame that owns this object.
|
|
|
|
+ int render_process_id_ = 0;
|
|
|
|
+ int render_frame_id_ = 0;
|
2021-12-16 23:35:54 +01:00
|
|
|
+
|
|
|
|
private:
|
|
|
|
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
|
|
|
// If this instance of PrintingContext should skip making any system calls
|