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

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: Fix win compile error 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
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 99a887873c075d237e4117c5391e0dc4594ec562..fd1054d730e09ca1e0ba8c37d110320bef333992 100644
--- a/chrome/browser/ui/webui/print_preview_ui.h
+++ b/chrome/browser/ui/webui/print_preview_ui.h
@@ -8,17 +8,24 @@
#include <string>
+#include "base/memory/scoped_ptr.h"
#include "base/memory/ref_counted.h"
+#include "chrome/browser/ui/webui/print_preview_data_source.h"
#include "content/browser/webui/web_ui.h"
-class PrintPreviewUIHTMLSource;
-
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
+ // PrintPreviewDataSource is valid and SetPrintPreviewData() does not get
+ // called.
+ void GetPrintPreviewData(PrintPreviewDataSource::PrintPreviewData* data);
+
+ // Sets the print preview |data|.
+ void SetPrintPreviewData(
+ const PrintPreviewDataSource::PrintPreviewData& data);
// Notify the Web UI renderer that preview data is available.
// |expected_pages_count| specifies the total number of pages.
@@ -36,7 +43,11 @@ class PrintPreviewUI : public WebUI {
void OnInitiatorTabClosed(const std::string& initiator_tab_url);
private:
- scoped_refptr<PrintPreviewUIHTMLSource> html_source_;
+ // Store chrome://Print data source.
+ scoped_refptr<PrintPreviewDataSource> data_source_;
+
+ // Store the PrintPreviewUI address string.
+ scoped_ptr<std::string> preview_ui_addr_str_;
Lei Zhang 2011/05/26 01:48:31 Why does this need to be a scoped_ptr?
kmadhusu 2011/05/26 15:51:22 Fixed.
DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI);
};

Powered by Google App Engine
This is Rietveld 408576698