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

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

Issue 7621087: Print Preview: Go from event driven print preview back to print preview with sync messages. The s... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix missing lock Created 9 years, 4 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
===================================================================
--- chrome/browser/ui/webui/print_preview_ui.h (revision 97706)
+++ chrome/browser/ui/webui/print_preview_ui.h (working copy)
@@ -41,10 +41,19 @@
void SetInitiatorTabURLAndTitle(const std::string& initiator_url,
const string16& initiator_tab_title);
- // Notifies the Web UI that there is a print preview request. There should be
- // a matching call to OnPreviewDataIsAvailable() or OnPrintPreviewFailed().
- void OnPrintPreviewRequest();
+ // Determines whether to cancel a print preview request based on
+ // |preview_ui_addr| and |request_id|.
+ // Can be called from any thread.
+ static void GetCurrentPrintPreviewStatus(const std::string& preview_ui_addr,
+ int request_id,
+ bool* cancel);
+ // Returns a string to uniquely identify this PrintPreviewUI.
+ std::string GetPrintPreviewUIAddress() const;
+
+ // Notifies the Web UI of a print preview request with |request_id|.
+ void OnPrintPreviewRequest(int request_id);
+
// Notifies the Web UI about the page count of the request preview.
void OnDidGetPreviewPageCount(
const PrintHostMsg_DidGetPreviewPageCount_Params& params);
@@ -68,9 +77,6 @@
// Notifies the Web UI that the print preview failed to render.
void OnPrintPreviewFailed();
- // Notifies the Web UI that the print preview request has been cancelled.
- void OnPrintPreviewCancelled();
-
// Notifies the Web UI that initiator tab is closed, so we can disable all the
// controls that need the initiator tab for generating the preview data.
void OnInitiatorTabClosed();
@@ -81,17 +87,10 @@
// Notifies the Web UI renderer that file selection has been cancelled.
void OnFileSelectionCancelled();
- // Returns true if there are pending requests.
- bool HasPendingRequests();
-
- int document_cookie();
-
private:
// Returns the Singleton instance of the PrintPreviewDataService.
PrintPreviewDataService* print_preview_data_service();
- void DecrementRequestCount();
-
base::TimeTicks initial_preview_start_time_;
// Store the PrintPreviewUI address string.
@@ -100,12 +99,6 @@
// Weak pointer to the WebUI handler.
PrintPreviewHandler* handler_;
- // The number of print preview requests in flight.
- uint32 request_count_;
-
- // Document cookie from the initiator renderer.
- int document_cookie_;
-
// Store the |initiator_url| in order to display an accurate error message
// when the initiator tab is closed/crashed.
std::string initiator_url_;
« 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