Index: chrome/browser/printing/print_preview_dialog_controller.h |
diff --git a/chrome/browser/printing/print_preview_dialog_controller.h b/chrome/browser/printing/print_preview_dialog_controller.h |
index 792b3fe20ee2cbf10b4840b9866e5fb48be85807..59a8a0dfa3cb6aa375f3ac3e435e9df72be8d7ce 100644 |
--- a/chrome/browser/printing/print_preview_dialog_controller.h |
+++ b/chrome/browser/printing/print_preview_dialog_controller.h |
@@ -79,10 +79,11 @@ class PrintPreviewDialogController |
return is_creating_print_preview_dialog_; |
} |
- void AddProxyDialogForWebContents(content::WebContents* source, |
Lei Zhang
2015/08/14 05:44:35
It's not clear what |source| and |target| refers t
|
- content::WebContents* target); |
+ void AddProxyDialogForWebContents(content::WebContents* distilled_contents, |
+ content::WebContents* initiator); |
- void RemoveProxyDialogForWebContents(content::WebContents* source); |
+ void RemoveProxyDialogForWebContents( |
+ content::WebContents* distilled_contents); |
private: |
friend class base::RefCounted<PrintPreviewDialogController>; |
@@ -93,6 +94,12 @@ class PrintPreviewDialogController |
using PrintPreviewDialogMap = |
std::map<content::WebContents*, content::WebContents*>; |
+ // 1:1 relationship between the distilled contents and its initiator tab. |
+ // Key: Distilled contents. |
+ // Value: Initiator. |
+ using DistilledContentsMap = |
+ std::map<content::WebContents*, content::WebContents*>; |
+ |
~PrintPreviewDialogController() override; |
// Handler for the RENDERER_PROCESS_CLOSED notification. This is observed when |
@@ -127,7 +134,8 @@ class PrintPreviewDialogController |
// Mapping between print preview dialog and the corresponding initiator. |
PrintPreviewDialogMap preview_dialog_map_; |
- PrintPreviewDialogMap proxied_dialog_map_; |
Lei Zhang
2015/08/14 05:44:35
Please do not reuse PrintPreviewDialogMap. Even th
|
+ // Mapping between distilled contents and the corresponding initiator. |
+ DistilledContentsMap proxied_dialog_map_; |
// A registrar for listening to notifications. |
content::NotificationRegistrar registrar_; |