Chromium Code Reviews| Index: chrome/renderer/printing/print_web_view_helper.h |
| diff --git a/chrome/renderer/printing/print_web_view_helper.h b/chrome/renderer/printing/print_web_view_helper.h |
| index 71ff88c17a91242743826d31103a9c9c2921ff5e..5642470dd250ac704498f6021b411ad63a65604c 100644 |
| --- a/chrome/renderer/printing/print_web_view_helper.h |
| +++ b/chrome/renderer/printing/print_web_view_helper.h |
| @@ -7,6 +7,7 @@ |
| #include <vector> |
| +#include "base/callback.h" |
| #include "base/gtest_prod_util.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/memory/shared_memory.h" |
| @@ -461,6 +462,14 @@ class PrintWebViewHelper |
| bool is_loading_; |
| bool is_scripted_preview_delayed_; |
| base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; |
| + |
| + // Stores the type of function that should be called when DidStopLoading() is |
| + // called. This is needed due to a race condition that is caused when |
| + // RequestPrintPreview is called with |
| + // |PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME| and DidStopLoading() has not |
| + // yet been called. This allows the call to RequestPrintPreview to be |
| + // deferred until DidStopLoading() has actually been called. |
| + PrintPreviewRequestType on_stop_loading_type_; |
|
ivandavid
2014/08/13 20:58:55
I am using an enum this time because using base::C
Vitaly Buka (NO REVIEWS)
2014/08/13 23:39:45
Actually I like more Closure version.
On 2014/08/
ivandavid
2014/08/14 03:38:13
Done.
ivandavid
2014/08/14 03:38:13
Ok. I re-implemented it.
ivandavid
2014/08/14 03:38:13
Ok. I reimplemented it.
|
| DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| }; |