| 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_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 5 #ifndef CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| 6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // for print. A new PrepareFrameAndViewForPrint is created to fulfill the | 173 // for print. A new PrepareFrameAndViewForPrint is created to fulfill the |
| 174 // request and is filled into the |prepare| argument. | 174 // request and is filled into the |prepare| argument. |
| 175 bool InitPrintSettingsAndPrepareFrame( | 175 bool InitPrintSettingsAndPrepareFrame( |
| 176 WebKit::WebFrame* frame, | 176 WebKit::WebFrame* frame, |
| 177 WebKit::WebNode* node, | 177 WebKit::WebNode* node, |
| 178 scoped_ptr<PrepareFrameAndViewForPrint>* prepare); | 178 scoped_ptr<PrepareFrameAndViewForPrint>* prepare); |
| 179 | 179 |
| 180 // Update the current print settings with new |job_settings|. |job_settings| | 180 // Update the current print settings with new |job_settings|. |job_settings| |
| 181 // dictionary contains print job details such as printer name, number of | 181 // dictionary contains print job details such as printer name, number of |
| 182 // copies, page range, etc. | 182 // copies, page range, etc. |
| 183 bool UpdatePrintSettings(const base::DictionaryValue& job_settings); | 183 bool UpdatePrintSettings(const base::DictionaryValue& job_settings, |
| 184 bool is_preview); |
| 184 | 185 |
| 185 // Get final print settings from the user. | 186 // Get final print settings from the user. |
| 186 // Return false if the user cancels or on error. | 187 // Return false if the user cancels or on error. |
| 187 bool GetPrintSettingsFromUser(WebKit::WebFrame* frame, | 188 bool GetPrintSettingsFromUser(WebKit::WebFrame* frame, |
| 188 int expected_pages_count, | 189 int expected_pages_count, |
| 189 bool use_browser_overlays); | 190 bool use_browser_overlays); |
| 190 | 191 |
| 191 // Page Printing / Rendering ------------------------------------------------ | 192 // Page Printing / Rendering ------------------------------------------------ |
| 192 | 193 |
| 193 // Prints all the pages listed in |params|. | 194 // Prints all the pages listed in |params|. |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 | 396 |
| 396 State state_; | 397 State state_; |
| 397 }; | 398 }; |
| 398 | 399 |
| 399 PrintPreviewContext print_preview_context_; | 400 PrintPreviewContext print_preview_context_; |
| 400 | 401 |
| 401 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 402 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| 402 }; | 403 }; |
| 403 | 404 |
| 404 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 405 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| OLD | NEW |