| OLD | NEW |
| 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_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // Clear the existing print preview data. | 41 // Clear the existing print preview data. |
| 42 void ClearAllPreviewData(); | 42 void ClearAllPreviewData(); |
| 43 | 43 |
| 44 // Returns the available draft page count. | 44 // Returns the available draft page count. |
| 45 int GetAvailableDraftPageCount(); | 45 int GetAvailableDraftPageCount(); |
| 46 | 46 |
| 47 // Setters | 47 // Setters |
| 48 void SetInitiatorTabURLAndTitle(const std::string& initiator_url, | 48 void SetInitiatorTabURLAndTitle(const std::string& initiator_url, |
| 49 const string16& initiator_tab_title); | 49 const string16& initiator_tab_title); |
| 50 | 50 |
| 51 // Notify the Web UI about the initiator tab title. |
| 52 void OnGetInitiatorTabTitle(); |
| 53 |
| 51 // Determines whether to cancel a print preview request based on | 54 // Determines whether to cancel a print preview request based on |
| 52 // |preview_ui_addr| and |request_id|. | 55 // |preview_ui_addr| and |request_id|. |
| 53 // Can be called from any thread. | 56 // Can be called from any thread. |
| 54 static void GetCurrentPrintPreviewStatus(const std::string& preview_ui_addr, | 57 static void GetCurrentPrintPreviewStatus(const std::string& preview_ui_addr, |
| 55 int request_id, | 58 int request_id, |
| 56 bool* cancel); | 59 bool* cancel); |
| 57 | 60 |
| 58 // Returns a string to uniquely identify this PrintPreviewUI. | 61 // Returns a string to uniquely identify this PrintPreviewUI. |
| 59 std::string GetPrintPreviewUIAddress() const; | 62 std::string GetPrintPreviewUIAddress() const; |
| 60 | 63 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 std::string initiator_url_; | 130 std::string initiator_url_; |
| 128 | 131 |
| 129 // Store the initiator tab title, used for populating the print preview tab | 132 // Store the initiator tab title, used for populating the print preview tab |
| 130 // title. | 133 // title. |
| 131 string16 initiator_tab_title_; | 134 string16 initiator_tab_title_; |
| 132 | 135 |
| 133 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); | 136 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
| 134 }; | 137 }; |
| 135 | 138 |
| 136 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ | 139 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ |
| OLD | NEW |