2023-01-30 18:43:54 +01:00
|
|
|
diff --git chrome/browser/printing/printer_query.cc chrome/browser/printing/printer_query.cc
|
2024-01-26 03:12:43 +01:00
|
|
|
index 418f53b0db3a2..4abcc0005eb1d 100644
|
2023-01-30 18:43:54 +01:00
|
|
|
--- chrome/browser/printing/printer_query.cc
|
|
|
|
+++ chrome/browser/printing/printer_query.cc
|
2023-12-06 21:16:15 +01:00
|
|
|
@@ -124,6 +124,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id)
|
2023-01-30 18:43:54 +01:00
|
|
|
rfh_id_(rfh_id),
|
|
|
|
cookie_(PrintSettings::NewCookie()) {
|
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
|
|
|
}
|
|
|
|
|
2023-01-30 18:43:54 +01:00
|
|
|
PrinterQuery::~PrinterQuery() {
|
2017-06-15 17:27:56 +02:00
|
|
|
diff --git printing/printing_context.h printing/printing_context.h
|
2024-01-26 03:12:43 +01:00
|
|
|
index 63f170c950504..962e60d23da59 100644
|
2017-06-15 17:27:56 +02:00
|
|
|
--- printing/printing_context.h
|
|
|
|
+++ printing/printing_context.h
|
2024-01-26 03:12:43 +01:00
|
|
|
@@ -215,6 +215,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
|
|
|
|
void SetJobId(int job_id);
|
|
|
|
#endif
|
2017-06-15 17:27:56 +02:00
|
|
|
|
|
|
|
+ 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:
|
2023-12-06 21:16:15 +01:00
|
|
|
PrintingContext(Delegate* delegate, ProcessBehavior process_behavior);
|
2017-06-15 17:27:56 +02:00
|
|
|
|
2024-01-26 03:12:43 +01:00
|
|
|
@@ -248,6 +255,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
|
|
|
|
// management.
|
|
|
|
int job_id_ = kNoPrintJobId;
|
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:
|
2023-12-06 21:16:15 +01:00
|
|
|
const ProcessBehavior process_behavior_;
|
|
|
|
};
|