Index: chrome/browser/ui/webui/print_preview/hidden_print_preview.h |
diff --git a/chrome/browser/ui/webui/print_preview/hidden_print_preview.h b/chrome/browser/ui/webui/print_preview/hidden_print_preview.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8f216f6771d7f2589b090799f5ec2cfdd38c6bd5 |
--- /dev/null |
+++ b/chrome/browser/ui/webui/print_preview/hidden_print_preview.h |
@@ -0,0 +1,45 @@ |
+// Copyright (c) 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HIDDEN_PRINT_PREVIEW_H_ |
+#define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HIDDEN_PRINT_PREVIEW_H_ |
+ |
+#include "base/memory/shared_memory.h" |
+#include "base/values.h" |
+#include "chrome/browser/ui/webui/print_preview/hidden_web_contents.h" |
+ |
+class PrintPreviewUI; |
+struct PrintHostMsg_DidPreviewPage_Params; |
+struct PrintHostMsg_DidGetPreviewPageCount_Params; |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+class HiddenPrintPreview |
+ : public HiddenWebContents::Observer { |
+ public: |
+ HiddenPrintPreview( |
+ content::WebContents* target_web_contents, |
+ PrintPreviewUI* print_preview_ui, |
+ scoped_ptr<base::DictionaryValue> settings); |
+ ~HiddenPrintPreview() override; |
+ |
+ void OnFail(HiddenWebContents* contents) override; |
+ void OnFinishedLoad(HiddenWebContents* contents) override; |
+ |
+ void SendPrintPreviewMessageIfNecessary(); |
+ |
+ content::WebContents* GetHiddenWebContents(); |
+ |
+ private: |
+ void StartRendering(); |
+ |
+ scoped_ptr<HiddenWebContents> hidden_web_contents_; |
+ content::WebContents* target_web_contents_; |
+ scoped_ptr<base::DictionaryValue> settings_; |
+ PrintPreviewUI* print_preview_ui_; |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HIDDEN_PRINT_PREVIEW_H_ |