OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HIDDEN_PRINT_PREVIEW_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HIDDEN_PRINT_PREVIEW_H_ |
| 7 |
| 8 #include "base/memory/shared_memory.h" |
| 9 #include "base/values.h" |
| 10 #include "chrome/browser/ui/webui/print_preview/hidden_web_contents.h" |
| 11 |
| 12 class PrintPreviewUI; |
| 13 struct PrintHostMsg_DidPreviewPage_Params; |
| 14 struct PrintHostMsg_DidGetPreviewPageCount_Params; |
| 15 |
| 16 namespace content { |
| 17 class WebContents; |
| 18 } |
| 19 |
| 20 class HiddenPrintPreview |
| 21 : public HiddenWebContents::Observer { |
| 22 public: |
| 23 HiddenPrintPreview( |
| 24 content::WebContents* target_web_contents, |
| 25 PrintPreviewUI* print_preview_ui, |
| 26 scoped_ptr<base::DictionaryValue> settings); |
| 27 ~HiddenPrintPreview() override; |
| 28 |
| 29 void OnFail(HiddenWebContents* contents) override; |
| 30 void OnFinishedLoad(HiddenWebContents* contents) override; |
| 31 |
| 32 void SendPrintPreviewMessageIfNecessary(); |
| 33 |
| 34 content::WebContents* GetHiddenWebContents(); |
| 35 |
| 36 private: |
| 37 void StartRendering(); |
| 38 |
| 39 scoped_ptr<HiddenWebContents> hidden_web_contents_; |
| 40 content::WebContents* target_web_contents_; |
| 41 scoped_ptr<base::DictionaryValue> settings_; |
| 42 PrintPreviewUI* print_preview_ui_; |
| 43 }; |
| 44 |
| 45 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HIDDEN_PRINT_PREVIEW_H_ |
OLD | NEW |