Chromium Code Reviews| Index: chrome/browser/ui/webui/print_preview/print_preview_ui.h |
| diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.h b/chrome/browser/ui/webui/print_preview/print_preview_ui.h |
| index 9ae4576bade4501d5795977c13218896a797e372..0ec43136922ecf3cc9045aa8ab62f94644924af7 100644 |
| --- a/chrome/browser/ui/webui/print_preview/print_preview_ui.h |
| +++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.h |
| @@ -10,6 +10,7 @@ |
| #include "base/callback_forward.h" |
| #include "base/gtest_prod_util.h" |
| #include "base/memory/ref_counted.h" |
| +#include "base/memory/weak_ptr.h" |
| #include "base/time/time.h" |
| #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" |
| @@ -166,6 +167,8 @@ class PrintPreviewUI : public ConstrainedWebDialogUI { |
| // Passes |closure| to PrintPreviewHandler::SetPdfSavedClosureForTesting(). |
| void SetPdfSavedClosureForTesting(const base::Closure& closure); |
| + base::WeakPtr<PrintPreviewUI> GetWeakPtr(); |
| + |
| private: |
| friend class PrintPreviewHandlerTest; |
| FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsCustom); |
| @@ -207,6 +210,8 @@ class PrintPreviewUI : public ConstrainedWebDialogUI { |
| // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. |
| bool dialog_closed_; |
| + base::WeakPtrFactory<PrintPreviewUI> weak_ptr_factory_; |
|
Vitaly Buka (NO REVIEWS)
2015/07/20 20:45:33
just
base::WeakPtrFactory<PrintPreviewUI> weak_ptr
arjunpatel
2015/07/21 17:25:01
Please review and clarify (this is a header file).
Vitaly Buka (NO REVIEWS)
2015/07/21 18:38:18
Correct, you can move weak_ptr_factory_(this) from
|
| + |
| DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
| }; |