| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DIALOG_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DIALOG_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DIALOG_CONTROLLER_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DIALOG_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 bool is_creating_print_preview_dialog() const { | 78 bool is_creating_print_preview_dialog() const { |
| 79 return is_creating_print_preview_dialog_; | 79 return is_creating_print_preview_dialog_; |
| 80 } | 80 } |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 friend class base::RefCounted<PrintPreviewDialogController>; | 83 friend class base::RefCounted<PrintPreviewDialogController>; |
| 84 | 84 |
| 85 // 1:1 relationship between a print preview dialog and its initiator tab. | 85 // 1:1 relationship between a print preview dialog and its initiator tab. |
| 86 // Key: Print preview dialog. | 86 // Key: Print preview dialog. |
| 87 // Value: Initiator. | 87 // Value: Initiator. |
| 88 typedef std::map<content::WebContents*, content::WebContents*> | 88 using PrintPreviewDialogMap = |
| 89 PrintPreviewDialogMap; | 89 std::map<content::WebContents*, content::WebContents*>; |
| 90 | 90 |
| 91 ~PrintPreviewDialogController() override; | 91 ~PrintPreviewDialogController() override; |
| 92 | 92 |
| 93 // Handler for the RENDERER_PROCESS_CLOSED notification. This is observed when | 93 // Handler for the RENDERER_PROCESS_CLOSED notification. This is observed when |
| 94 // the initiator renderer crashed. | 94 // the initiator renderer crashed. |
| 95 void OnRendererProcessClosed(content::RenderProcessHost* rph); | 95 void OnRendererProcessClosed(content::RenderProcessHost* rph); |
| 96 | 96 |
| 97 // Handler for the WEB_CONTENTS_DESTROYED notification. This is observed when | 97 // Handler for the WEB_CONTENTS_DESTROYED notification. This is observed when |
| 98 // either WebContents is closed. | 98 // either WebContents is closed. |
| 99 void OnWebContentsDestroyed(content::WebContents* contents); | 99 void OnWebContentsDestroyed(content::WebContents* contents); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // Whether the PrintPreviewDialogController is in the middle of creating a | 132 // Whether the PrintPreviewDialogController is in the middle of creating a |
| 133 // print preview dialog. | 133 // print preview dialog. |
| 134 bool is_creating_print_preview_dialog_; | 134 bool is_creating_print_preview_dialog_; |
| 135 | 135 |
| 136 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogController); | 136 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogController); |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 } // namespace printing | 139 } // namespace printing |
| 140 | 140 |
| 141 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DIALOG_CONTROLLER_H_ | 141 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DIALOG_CONTROLLER_H_ |
| OLD | NEW |