| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PRINT_PREVIEW_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 public: | 149 public: |
| 150 virtual bool IsAutoCancelEnabled() = 0; | 150 virtual bool IsAutoCancelEnabled() = 0; |
| 151 virtual void DidGetPreviewPageCount(int page_count) = 0; | 151 virtual void DidGetPreviewPageCount(int page_count) = 0; |
| 152 virtual void DidRenderPreviewPage(content::WebContents* preview_dialog) = 0; | 152 virtual void DidRenderPreviewPage(content::WebContents* preview_dialog) = 0; |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 static void SetDelegateForTesting(TestingDelegate* delegate); | 155 static void SetDelegateForTesting(TestingDelegate* delegate); |
| 156 | 156 |
| 157 private: | 157 private: |
| 158 friend class PrintPreviewHandlerTest; | 158 friend class PrintPreviewHandlerTest; |
| 159 friend class PrintPreviewPdfGeneratedBrowserTest; |
| 159 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsCustom); | 160 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsCustom); |
| 160 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsDefault); | 161 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, StickyMarginsDefault); |
| 161 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, | 162 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, |
| 162 StickyMarginsCustomThenDefault); | 163 StickyMarginsCustomThenDefault); |
| 163 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, | 164 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, |
| 164 GetLastUsedMarginSettingsCustom); | 165 GetLastUsedMarginSettingsCustom); |
| 165 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, | 166 FRIEND_TEST_ALL_PREFIXES(PrintPreviewHandlerTest, |
| 166 GetLastUsedMarginSettingsDefault); | 167 GetLastUsedMarginSettingsDefault); |
| 167 FRIEND_TEST_ALL_PREFIXES(PrintPreviewDialogControllerUnitTest, | 168 FRIEND_TEST_ALL_PREFIXES(PrintPreviewDialogControllerUnitTest, |
| 168 TitleAfterReload); | 169 TitleAfterReload); |
| 170 FRIEND_TEST_ALL_PREFIXES(PrintPreviewPdfGeneratedBrowserTest, |
| 171 DummyTest); |
| 169 | 172 |
| 170 // Returns the Singleton instance of the PrintPreviewDataService. | 173 // Returns the Singleton instance of the PrintPreviewDataService. |
| 171 PrintPreviewDataService* print_preview_data_service(); | 174 PrintPreviewDataService* print_preview_data_service(); |
| 172 | 175 |
| 173 base::TimeTicks initial_preview_start_time_; | 176 base::TimeTicks initial_preview_start_time_; |
| 174 | 177 |
| 175 // The unique ID for this class instance. Stored here to avoid calling | 178 // The unique ID for this class instance. Stored here to avoid calling |
| 176 // GetIDForPrintPreviewUI() everywhere. | 179 // GetIDForPrintPreviewUI() everywhere. |
| 177 const int32 id_; | 180 const int32 id_; |
| 178 | 181 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 192 // title. | 195 // title. |
| 193 base::string16 initiator_title_; | 196 base::string16 initiator_title_; |
| 194 | 197 |
| 195 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. | 198 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. |
| 196 bool dialog_closed_; | 199 bool dialog_closed_; |
| 197 | 200 |
| 198 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); | 201 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
| 199 }; | 202 }; |
| 200 | 203 |
| 201 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ | 204 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ |
| OLD | NEW |