mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Linux: Pass CefBrowser to CefPrintHandler callbacks (issue #2196)
This commit is contained in:
41
patch/patches/printing_context_2196.patch
Normal file
41
patch/patches/printing_context_2196.patch
Normal file
@ -0,0 +1,41 @@
|
||||
diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc
|
||||
index d06b61a..f41f848 100644
|
||||
--- chrome/browser/printing/print_job_worker.cc
|
||||
+++ chrome/browser/printing/print_job_worker.cc
|
||||
@@ -121,6 +121,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id,
|
||||
printing_context_delegate_ = base::MakeUnique<PrintingContextDelegate>(
|
||||
render_process_id, render_frame_id);
|
||||
printing_context_ = PrintingContext::Create(printing_context_delegate_.get());
|
||||
+ printing_context_->set_render_ids(render_process_id, render_frame_id);
|
||||
}
|
||||
|
||||
PrintJobWorker::~PrintJobWorker() {
|
||||
diff --git printing/printing_context.h printing/printing_context.h
|
||||
index 7054654..ed5b664 100644
|
||||
--- printing/printing_context.h
|
||||
+++ printing/printing_context.h
|
||||
@@ -127,6 +127,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);
|
||||
|
||||
@@ -151,6 +158,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);
|
||||
};
|
Reference in New Issue
Block a user