inspectable_web_contents_ = managed_web_contents();
Observe(GetWebContents());
- printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
}
WebContents::~WebContents() {
}
void WebContents::PrintToPDF(const base::DictionaryValue& setting,
- const PrintToPDFCallback& callback) {
+ const PrintToPDFCallback& callback) {
printing::PrintPreviewMessageHandler::FromWebContents(web_contents())->
PrintToPDF(setting, callback);
}
// Print current page as PDF.
void PrintToPDF(const base::DictionaryValue& setting,
- const PrintToPDFCallback& callback);
+ const PrintToPDFCallback& callback);
// Editing commands.
void Undo();
#include "atom/browser/ui/file_dialog.h"
#include "atom/browser/web_dialog_helper.h"
#include "base/files/file_util.h"
+#include "chrome/browser/printing/print_preview_message_handler.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/render_process_host.h"
owner_window_ = owner_window;
web_contents->SetDelegate(this);
+ printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
+
// Create InspectableWebContents.
web_contents_.reset(brightray::InspectableWebContents::Create(web_contents));
web_contents_->SetDelegate(this);
#include "brightray/browser/inspectable_web_contents.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "chrome/browser/printing/print_view_manager_basic.h"
-#include "chrome/browser/printing/print_preview_message_handler.h"
-#include "chrome/browser/ui/browser_dialogs.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
zoom_factor_(1.0),
weak_factory_(this) {
printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
- printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
InitWithWebContents(web_contents, this);
#include "chrome/browser/printing/print_preview_message_handler.h"
-#include <vector>
-
-#include "atom/browser/ui/file_dialog.h"
-#include "atom/browser/native_window.h"
#include "base/bind.h"
-#include "base/json/json_reader.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/ref_counted_memory.h"
#include "base/memory/shared_memory.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/printing/print_job_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_ui.h"
#include "printing/page_size_margins.h"
#include "printing/print_job_constants.h"
#include "printing/pdf_metafile_skia.h"