cef/patch/patches/printing_context_2196.patch

42 lines
1.5 KiB
Diff
Raw Normal View History

diff --git chrome/browser/printing/printer_query.cc chrome/browser/printing/printer_query.cc
index 75fb743f95c37..a79ca84b4ff4c 100644
--- chrome/browser/printing/printer_query.cc
+++ chrome/browser/printing/printer_query.cc
@@ -124,6 +124,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id)
rfh_id_(rfh_id),
cookie_(PrintSettings::NewCookie()) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ printing_context_->set_render_ids(rfh_id.child_id, rfh_id.frame_routing_id);
}
PrinterQuery::~PrinterQuery() {
diff --git printing/printing_context.h printing/printing_context.h
index 6db58a9992642..ac57e5c200079 100644
--- printing/printing_context.h
+++ printing/printing_context.h
@@ -204,6 +204,13 @@ class COMPONENT_EXPORT(PRINTING) 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:
PrintingContext(Delegate* delegate, ProcessBehavior process_behavior);
@@ -234,6 +241,10 @@ class COMPONENT_EXPORT(PRINTING) 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:
const ProcessBehavior process_behavior_;
};