| 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 #include "chrome/renderer/printing/print_web_view_helper.h" | 5 #include "chrome/renderer/printing/print_web_view_helper.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
| 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h" | 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h" |
| 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPrintParams.h" | 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPrintParams.h" |
| 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPrintScalingOption
.h" | 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPrintScalingOption
.h" |
| 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" |
| 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" |
| 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h" | 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h" |
| 46 #include "ui/base/l10n/l10n_util.h" | 46 #include "ui/base/l10n/l10n_util.h" |
| 47 #include "ui/base/resource/resource_bundle.h" | 47 #include "ui/base/resource/resource_bundle.h" |
| 48 #include "webkit/glue/webpreferences.h" | 48 #include "webkit/common/webpreferences.h" |
| 49 #include "webkit/renderer/webpreferences_renderer.h" |
| 49 | 50 |
| 50 namespace printing { | 51 namespace printing { |
| 51 | 52 |
| 52 namespace { | 53 namespace { |
| 53 | 54 |
| 54 const double kMinDpi = 1.0; | 55 const double kMinDpi = 1.0; |
| 55 | 56 |
| 56 const char kPageLoadScriptFormat[] = | 57 const char kPageLoadScriptFormat[] = |
| 57 "document.open(); document.write(%s); document.close();"; | 58 "document.open(); document.write(%s); document.close();"; |
| 58 | 59 |
| (...skipping 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1984 } | 1985 } |
| 1985 | 1986 |
| 1986 void PrintWebViewHelper::PrintPreviewContext::ClearContext() { | 1987 void PrintWebViewHelper::PrintPreviewContext::ClearContext() { |
| 1987 prep_frame_view_.reset(); | 1988 prep_frame_view_.reset(); |
| 1988 metafile_.reset(); | 1989 metafile_.reset(); |
| 1989 pages_to_render_.clear(); | 1990 pages_to_render_.clear(); |
| 1990 error_ = PREVIEW_ERROR_NONE; | 1991 error_ = PREVIEW_ERROR_NONE; |
| 1991 } | 1992 } |
| 1992 | 1993 |
| 1993 } // namespace printing | 1994 } // namespace printing |
| OLD | NEW |