| 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_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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 227 |
| 228 // Initialize print page settings with default settings and prepare the frame | 228 // Initialize print page settings with default settings and prepare the frame |
| 229 // for print. A new PrepareFrameAndViewForPrint is created to fulfill the | 229 // for print. A new PrepareFrameAndViewForPrint is created to fulfill the |
| 230 // request and is filled into the |prepare| argument. | 230 // request and is filled into the |prepare| argument. |
| 231 // Used only for native printing workflow. | 231 // Used only for native printing workflow. |
| 232 bool InitPrintSettingsAndPrepareFrame( | 232 bool InitPrintSettingsAndPrepareFrame( |
| 233 WebKit::WebFrame* frame, | 233 WebKit::WebFrame* frame, |
| 234 const WebKit::WebNode& node, | 234 const WebKit::WebNode& node, |
| 235 scoped_ptr<PrepareFrameAndViewForPrint>* prepare); | 235 scoped_ptr<PrepareFrameAndViewForPrint>* prepare); |
| 236 | 236 |
| 237 // Update the current print settings with new |job_settings|. |job_settings| | 237 // Update the current print settings with new |passed_job_settings|. |
| 238 // dictionary contains print job details such as printer name, number of | 238 // |passed_job_settings| dictionary contains print job details such as printer |
| 239 // copies, page range, etc. | 239 // name, number of copies, page range, etc. |
| 240 bool UpdatePrintSettings(WebKit::WebFrame* frame, | 240 bool UpdatePrintSettings(WebKit::WebFrame* frame, |
| 241 const WebKit::WebNode& node, | 241 const WebKit::WebNode& node, |
| 242 const base::DictionaryValue& passed_job_settings); | 242 const base::DictionaryValue& passed_job_settings); |
| 243 | 243 |
| 244 // Get final print settings from the user. | 244 // Get final print settings from the user. |
| 245 // Return false if the user cancels or on error. | 245 // Return false if the user cancels or on error. |
| 246 bool GetPrintSettingsFromUser(WebKit::WebFrame* frame, | 246 bool GetPrintSettingsFromUser(WebKit::WebFrame* frame, |
| 247 const WebKit::WebNode& node, | 247 const WebKit::WebNode& node, |
| 248 int expected_pages_count, | 248 int expected_pages_count, |
| 249 bool use_browser_overlays); | 249 bool use_browser_overlays); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 | 498 |
| 499 State state_; | 499 State state_; |
| 500 }; | 500 }; |
| 501 | 501 |
| 502 bool print_node_in_progress_; | 502 bool print_node_in_progress_; |
| 503 PrintPreviewContext print_preview_context_; | 503 PrintPreviewContext print_preview_context_; |
| 504 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 504 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| 505 }; | 505 }; |
| 506 | 506 |
| 507 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 507 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| OLD | NEW |