cef/patch/patches/printing_context_2196.patch

42 lines
1.5 KiB
Diff

diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc
index 691c476708b6..f198e2d0584f 100644
--- chrome/browser/printing/print_job_worker.cc
+++ chrome/browser/printing/print_job_worker.cc
@@ -148,6 +148,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id,
thread_("Printing_Worker"),
weak_factory_(this) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+ printing_context_->set_render_ids(render_process_id, render_frame_id);
}
PrintJobWorker::~PrintJobWorker() {
diff --git printing/printing_context.h printing/printing_context.h
index 9ccc1a6680bc..c0494a1cc2e2 100644
--- printing/printing_context.h
+++ printing/printing_context.h
@@ -129,6 +129,13 @@ class PRINTING_EXPORT PrintingContext {
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);
@@ -153,6 +160,10 @@ class PRINTING_EXPORT PrintingContext {
// 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);
};