Expose Print API to webContents and webView.

Also move the print implementation from window to webContents.
This commit is contained in:
Haojian Wu 2015-06-13 21:23:45 +08:00
parent 57580e00f9
commit 47eac062f6
11 changed files with 62 additions and 65 deletions

View file

@ -13,6 +13,7 @@
#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/printing/print_view_manager_basic.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"
@ -103,6 +104,7 @@ void CommonWebContentsDelegate::InitWithWebContents(
owner_window_ = owner_window;
web_contents->SetDelegate(this);
printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
// Create InspectableWebContents.