• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc
2index c7a7f857a28d0..9479a7874ea3b 100644
3--- chrome/browser/printing/print_job_worker.cc
4+++ chrome/browser/printing/print_job_worker.cc
5@@ -136,6 +136,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id)
6                                   ShouldPrintingContextSkipSystemCalls())),
7       thread_("Printing_Worker") {
8   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
9+  printing_context_->set_render_ids(render_process_id, render_frame_id);
10 }
11
12 PrintJobWorker::~PrintJobWorker() {
13diff --git printing/printing_context.h printing/printing_context.h
14index 3f36303105b79..aea7f788504d6 100644
15--- printing/printing_context.h
16+++ printing/printing_context.h
17@@ -172,6 +172,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
18
19   int job_id() const { return job_id_; }
20
21+  void set_render_ids(int render_process_id, int render_frame_id) {
22+    render_process_id_ = render_process_id;
23+    render_frame_id_ = render_frame_id;
24+  }
25+  int render_process_id() const { return render_process_id_; }
26+  int render_frame_id() const { return render_frame_id_; }
27+
28  protected:
29   explicit PrintingContext(Delegate* delegate);
30
31@@ -216,6 +223,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
32   // The job id for the current job. The value is 0 if no jobs are active.
33   int job_id_;
34
35+  // Routing IDs for the frame that owns this object.
36+  int render_process_id_ = 0;
37+  int render_frame_id_ = 0;
38+
39  private:
40 #if BUILDFLAG(ENABLE_OOP_PRINTING)
41   // If this instance of PrintingContext should skip making any system calls
42