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

Unified Diff: chrome/browser/ui/webui/print_preview_ui.h

Issue 7063030: PrintPreview: Print Preview is not staying associated with initiator renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « chrome/browser/ui/webui/print_preview_handler.cc ('k') | chrome/browser/ui/webui/print_preview_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_ui.h
diff --git a/chrome/browser/ui/webui/print_preview_ui.h b/chrome/browser/ui/webui/print_preview_ui.h
index ad2f8bd0efcc7b368a63757d46f8041f318047ec..dc6d69121acd7b305482fd147b13c668bec49983 100644
--- a/chrome/browser/ui/webui/print_preview_ui.h
+++ b/chrome/browser/ui/webui/print_preview_ui.h
@@ -9,17 +9,25 @@
#include <string>
#include "base/memory/ref_counted.h"
+#include "base/memory/ref_counted_memory.h"
#include "base/time.h"
+#include "chrome/browser/printing/print_preview_data_service.h"
#include "content/browser/webui/web_ui.h"
-class PrintPreviewUIHTMLSource;
+class PrintPreviewDataService;
class PrintPreviewUI : public WebUI {
public:
explicit PrintPreviewUI(TabContents* contents);
virtual ~PrintPreviewUI();
- PrintPreviewUIHTMLSource* html_source();
+ // Gets the print preview |data|. The data is valid as long as the
+ // PrintPreviewDataService is valid and SetPrintPreviewData() does not get
+ // called.
+ void GetPrintPreviewData(scoped_refptr<RefCountedBytes>* data);
+
+ // Sets the print preview |data|.
+ void SetPrintPreviewData(const RefCountedBytes* data);
// Notify the Web UI renderer that preview data is available.
// |expected_pages_count| specifies the total number of pages.
@@ -37,9 +45,14 @@ class PrintPreviewUI : public WebUI {
void OnInitiatorTabClosed(const std::string& initiator_tab_url);
private:
- scoped_refptr<PrintPreviewUIHTMLSource> html_source_;
+ // Helper function
+ PrintPreviewDataService* print_preview_data_service();
+
base::TimeTicks initial_preview_start_time_;
+ // Store the PrintPreviewUI address string.
+ std::string preview_ui_addr_str_;
+
DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI);
};
« no previous file with comments | « chrome/browser/ui/webui/print_preview_handler.cc ('k') | chrome/browser/ui/webui/print_preview_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698