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

Side by Side Diff: chrome/browser/ui/webui/print_preview_handler.h

Issue 7550063: Print Preview: Handle a crashed initiator tab by showing a message in PP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 int index, 43 int index,
44 void* params) OVERRIDE; 44 void* params) OVERRIDE;
45 virtual void FileSelectionCanceled(void* params) OVERRIDE; 45 virtual void FileSelectionCanceled(void* params) OVERRIDE;
46 46
47 // PrintViewManagerObserver implementation. 47 // PrintViewManagerObserver implementation.
48 virtual void OnPrintDialogShown() OVERRIDE; 48 virtual void OnPrintDialogShown() OVERRIDE;
49 49
50 // Displays a modal dialog, prompting the user to select a file. 50 // Displays a modal dialog, prompting the user to select a file.
51 void SelectFile(const FilePath& default_path); 51 void SelectFile(const FilePath& default_path);
52 52
53 // Called when the print preview tab navigates. This is the last time this 53 // Called when the print preview tab is destroyed. This is the last time
54 // this object has access to the PrintViewManager in order to disconnect the 54 // this object has access to the PrintViewManager in order to disconnect the
55 // observer. 55 // observer.
56 void OnNavigation(); 56 void OnNavigation();
Lei Zhang 2011/08/11 01:30:51 Based on the comment, shouldn't this be renamed to
kmadhusu 2011/08/15 18:12:49 Fixed.
57 57
58 private: 58 private:
59 friend class PrintSystemTaskProxy; 59 friend class PrintSystemTaskProxy;
60 60
61 TabContents* preview_tab(); 61 TabContents* preview_tab();
62 62
63 // Get the default printer. |args| is unused. 63 // Get the default printer. |args| is unused.
64 void HandleGetDefaultPrinter(const base::ListValue* args); 64 void HandleGetDefaultPrinter(const base::ListValue* args);
65 65
66 // Get the list of printers. |args| is unused. 66 // Get the list of printers. |args| is unused.
(...skipping 26 matching lines...) Expand all
93 void HandleGetPrinterCapabilities(const base::ListValue* args); 93 void HandleGetPrinterCapabilities(const base::ListValue* args);
94 94
95 // Ask the initiator renderer to show the native print system dialog. 95 // Ask the initiator renderer to show the native print system dialog.
96 // |args| is unused. 96 // |args| is unused.
97 void HandleShowSystemDialog(const base::ListValue* args); 97 void HandleShowSystemDialog(const base::ListValue* args);
98 98
99 // Bring up a web page to allow the user to configure cloud print. 99 // Bring up a web page to allow the user to configure cloud print.
100 // |args| is unused. 100 // |args| is unused.
101 void HandleManageCloudPrint(const base::ListValue* args); 101 void HandleManageCloudPrint(const base::ListValue* args);
102 102
103 // Reloads the initiator tab and closes the associated preview tab.
104 void HandleReloadCrashedInitiatorTab(const base::ListValue* args);
105
103 // Ask the browser to show the native printer management dialog. 106 // Ask the browser to show the native printer management dialog.
104 // |args| is unused. 107 // |args| is unused.
105 void HandleManagePrinters(const base::ListValue* args); 108 void HandleManagePrinters(const base::ListValue* args);
106 109
107 // Ask the browser to close the preview tab. 110 // Ask the browser to close the preview tab.
108 // |args| is unused. 111 // |args| is unused.
109 void HandleClosePreviewTab(const base::ListValue* args); 112 void HandleClosePreviewTab(const base::ListValue* args);
110 113
111 // Send the printer capabilities to the Web UI. 114 // Send the printer capabilities to the Web UI.
112 // |settings_info| contains printer capabilities information. 115 // |settings_info| contains printer capabilities information.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Whether we have already logged a failed print preview. 168 // Whether we have already logged a failed print preview.
166 bool reported_failed_preview_; 169 bool reported_failed_preview_;
167 170
168 // Whether we have already logged the number of printers this session. 171 // Whether we have already logged the number of printers this session.
169 bool has_logged_printers_count_; 172 bool has_logged_printers_count_;
170 173
171 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); 174 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
172 }; 175 };
173 176
174 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ 177 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698