Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8369)

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.h

Issue 1125343004: Add a "Simplify Page" option to the print preview dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring following the proposals in the reviews Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/print_preview/print_preview_handler.h
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.h b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
index ddb400f460c9f2ee250fb317966451b6891ba6b5..7e927282cc4f97884955bb3619459cd64a796b0d 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
@@ -12,6 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/printing/print_view_manager_observer.h"
+#include "chrome/browser/ui/webui/print_preview/print_preview_distiller.h"
#include "components/signin/core/browser/gaia_cookie_manager_service.h"
#include "content/public/browser/web_ui_message_handler.h"
#include "ui/shell_dialogs/select_file_dialog.h"
@@ -333,6 +334,11 @@ class PrintPreviewHandler
// error.
void OnExtensionPrintResult(bool success, const std::string& status);
+ // Called when the DOM Distiller determines whether or not this page can
+ // be distilled.
+ // |distillable|: Whether or not this page can be distilled.
+ void HandleIsPageDistillableResult(bool distillable);
+
// Register/unregister from notifications of changes done to the GAIA
// cookie.
void RegisterForGaiaCookieChanges();
@@ -389,6 +395,10 @@ class PrintPreviewHandler
// notify the test if it was a successful save, only that it was attempted.
base::Closure pdf_file_saved_closure_;
+ // A print preview that is responsible for rendering the page after
+ // being processed by the DOM Distiller.
+ scoped_ptr<PrintPreviewDistiller> print_preview_distiller_;
+
base::WeakPtrFactory<PrintPreviewHandler> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);

Powered by Google App Engine
This is Rietveld 408576698