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

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

Issue 7747033: Merge 97702, 97820, 97976 (Closed) Base URL: svn://chrome-svn/chrome/branches/835/src/
Patch Set: 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 98330)
+++ chrome/browser/ui/webui/print_preview_ui.h (working copy)
@@ -37,11 +37,19 @@
// Clear the existing print preview data.
void ClearAllPreviewData();
- // Notify 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 +76,6 @@
// Notify the Web UI that the print preview failed to render.
void OnPrintPreviewFailed();
- // Notify the Web UI that the print preview request has been cancelled.
- void OnPrintPreviewCancelled();
-
// Notify 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.
// |initiator_tab_url| is passed in order to display a more accurate error
@@ -80,17 +85,10 @@
// Notify the Web UI renderer that file selection has been cancelled.
void OnFileSelectionCancelled();
- // Return true if there are pending requests.
- bool HasPendingRequests();
-
- int document_cookie();
-
private:
// Helper function
PrintPreviewDataService* print_preview_data_service();
- void DecrementRequestCount();
-
base::TimeTicks initial_preview_start_time_;
// Store the PrintPreviewUI address string.
@@ -99,12 +97,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_;
-
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