| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 #include "chrome/browser/printing/print_preview_data_service.h" | 14 #include "chrome/browser/printing/print_preview_data_service.h" |
| 15 #include "chrome/browser/ui/webui/constrained_html_ui.h" | 15 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" |
| 16 | 16 |
| 17 class PrintPreviewDataService; | 17 class PrintPreviewDataService; |
| 18 class PrintPreviewHandler; | 18 class PrintPreviewHandler; |
| 19 struct PrintHostMsg_DidGetPreviewPageCount_Params; | 19 struct PrintHostMsg_DidGetPreviewPageCount_Params; |
| 20 | 20 |
| 21 namespace base { | 21 namespace base { |
| 22 class RefCountedBytes; | 22 class RefCountedBytes; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace gfx { | 25 namespace gfx { |
| 26 class Rect; | 26 class Rect; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace printing { | 29 namespace printing { |
| 30 struct PageSizeMargins; | 30 struct PageSizeMargins; |
| 31 } | 31 } |
| 32 | 32 |
| 33 class PrintPreviewUI : public ConstrainedHtmlUI { | 33 class PrintPreviewUI : public ConstrainedWebDialogUI { |
| 34 public: | 34 public: |
| 35 explicit PrintPreviewUI(content::WebUI* web_ui); | 35 explicit PrintPreviewUI(content::WebUI* web_ui); |
| 36 virtual ~PrintPreviewUI(); | 36 virtual ~PrintPreviewUI(); |
| 37 | 37 |
| 38 // Gets the print preview |data|. |index| is zero-based, and can be | 38 // Gets the print preview |data|. |index| is zero-based, and can be |
| 39 // |printing::COMPLETE_PREVIEW_DOCUMENT_INDEX| to get the entire preview | 39 // |printing::COMPLETE_PREVIEW_DOCUMENT_INDEX| to get the entire preview |
| 40 // document. | 40 // document. |
| 41 void GetPrintPreviewDataForIndex(int index, | 41 void GetPrintPreviewDataForIndex(int index, |
| 42 scoped_refptr<base::RefCountedBytes>* data); | 42 scoped_refptr<base::RefCountedBytes>* data); |
| 43 | 43 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // Keeps track of whether OnClosePrintPreviewTab() has been called or not. | 178 // Keeps track of whether OnClosePrintPreviewTab() has been called or not. |
| 179 bool tab_closed_; | 179 bool tab_closed_; |
| 180 | 180 |
| 181 // True if the user visited the page directly, false if it's a live UI. | 181 // True if the user visited the page directly, false if it's a live UI. |
| 182 bool is_dummy_; | 182 bool is_dummy_; |
| 183 | 183 |
| 184 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); | 184 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ | 187 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ |
| OLD | NEW |