Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Side by Side Diff: components/printing/renderer/print_web_view_helper.h

Issue 2962983002: Print Preview: change getPreview to cr.sendWithPromise (Closed)
Patch Set: Fix check Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 5 #ifndef COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_
6 #define COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 6 #define COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 FRIEND_TEST_ALL_PREFIXES(MAYBE_PrintWebViewHelperTest, PrintLayoutTest); 147 FRIEND_TEST_ALL_PREFIXES(MAYBE_PrintWebViewHelperTest, PrintLayoutTest);
148 FRIEND_TEST_ALL_PREFIXES(MAYBE_PrintWebViewHelperTest, PrintWithIframe); 148 FRIEND_TEST_ALL_PREFIXES(MAYBE_PrintWebViewHelperTest, PrintWithIframe);
149 #endif // defined(OS_WIN) || defined(OS_MACOSX) 149 #endif // defined(OS_WIN) || defined(OS_MACOSX)
150 150
151 enum PrintingResult { 151 enum PrintingResult {
152 OK, 152 OK,
153 FAIL_PRINT_INIT, 153 FAIL_PRINT_INIT,
154 FAIL_PRINT, 154 FAIL_PRINT,
155 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) 155 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
156 FAIL_PREVIEW, 156 FAIL_PREVIEW,
157 INVALID_SETTINGS,
157 #endif 158 #endif
158 }; 159 };
159 160
160 enum PrintPreviewErrorBuckets { 161 enum PrintPreviewErrorBuckets {
161 PREVIEW_ERROR_NONE, // Always first. 162 PREVIEW_ERROR_NONE, // Always first.
162 PREVIEW_ERROR_BAD_SETTING, 163 PREVIEW_ERROR_BAD_SETTING,
163 PREVIEW_ERROR_METAFILE_COPY_FAILED, 164 PREVIEW_ERROR_METAFILE_COPY_FAILED,
164 PREVIEW_ERROR_METAFILE_INIT_FAILED_DEPRECATED, 165 PREVIEW_ERROR_METAFILE_INIT_FAILED_DEPRECATED,
165 PREVIEW_ERROR_ZERO_PAGES, 166 PREVIEW_ERROR_ZERO_PAGES,
166 PREVIEW_ERROR_MAC_DRAFT_METAFILE_INIT_FAILED_DEPRECATED, 167 PREVIEW_ERROR_MAC_DRAFT_METAFILE_INIT_FAILED_DEPRECATED,
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 base::Closure on_stop_loading_closure_; 558 base::Closure on_stop_loading_closure_;
558 559
559 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; 560 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_;
560 561
561 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); 562 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper);
562 }; 563 };
563 564
564 } // namespace printing 565 } // namespace printing
565 566
566 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 567 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/test/data/webui/print_preview/print_preview_tests.js ('k') | components/printing/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698