2017-06-15 17:27:56 +02:00
|
|
|
diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc
|
2018-05-14 13:24:05 +02:00
|
|
|
index 06a5fe2bac26..e9783f33933a 100644
|
2017-06-15 17:27:56 +02:00
|
|
|
--- chrome/browser/printing/print_job_worker.cc
|
|
|
|
+++ chrome/browser/printing/print_job_worker.cc
|
2018-05-14 13:24:05 +02:00
|
|
|
@@ -146,6 +146,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id,
|
2017-12-07 22:44:24 +01:00
|
|
|
weak_factory_(this) {
|
|
|
|
// The object is created in the IO thread.
|
2018-05-14 13:24:05 +02:00
|
|
|
DCHECK(query_->RunsTasksInCurrentSequence());
|
2017-06-15 17:27:56 +02:00
|
|
|
+ printing_context_->set_render_ids(render_process_id, render_frame_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
PrintJobWorker::~PrintJobWorker() {
|
|
|
|
diff --git printing/printing_context.h printing/printing_context.h
|
2018-03-20 21:15:08 +01:00
|
|
|
index 885937908414..03f0f0837f80 100644
|
2017-06-15 17:27:56 +02:00
|
|
|
--- printing/printing_context.h
|
|
|
|
+++ printing/printing_context.h
|
2018-03-20 21:15:08 +01:00
|
|
|
@@ -133,6 +133,13 @@ class PRINTING_EXPORT 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);
|
|
|
|
|
2018-03-20 21:15:08 +01:00
|
|
|
@@ -157,6 +164,10 @@ class PRINTING_EXPORT 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_;
|
|
|
|
|
|
|
|
+ // Routing IDs for the frame that owns this object.
|
|
|
|
+ int render_process_id_ = 0;
|
|
|
|
+ int render_frame_id_ = 0;
|
|
|
|
+
|
|
|
|
private:
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(PrintingContext);
|
|
|
|
};
|