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

Unified Diff: chrome/browser/ui/webui/print_preview/hidden_print_preview.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: Rebase and remove custom URL source Created 5 years, 6 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/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_

Powered by Google App Engine
This is Rietveld 408576698