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

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 981843003: Printing: PDFs should only be fit to page if there is a size mismatch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pdf169120
Patch Set: rebase Created 5 years, 9 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
« no previous file with comments | « components/printing/renderer/print_web_view_helper.cc ('k') | pdf/instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 preset_options->duplexMode = blink::WebShortEdge; 1830 preset_options->duplexMode = blink::WebShortEdge;
1831 break; 1831 break;
1832 case PP_PRIVATEDUPLEXMODE_LONG_EDGE: 1832 case PP_PRIVATEDUPLEXMODE_LONG_EDGE:
1833 preset_options->duplexMode = blink::WebLongEdge; 1833 preset_options->duplexMode = blink::WebLongEdge;
1834 break; 1834 break;
1835 default: 1835 default:
1836 preset_options->duplexMode = blink::WebUnknownDuplexMode; 1836 preset_options->duplexMode = blink::WebUnknownDuplexMode;
1837 break; 1837 break;
1838 } 1838 }
1839 preset_options->copies = options.copies; 1839 preset_options->copies = options.copies;
1840 preset_options->isPageSizeUniform = PP_ToBool(options.is_page_size_uniform);
1841 preset_options->uniformPageSize =
1842 blink::WebSize(options.uniform_page_size.width,
1843 options.uniform_page_size.height);
1840 1844
1841 return true; 1845 return true;
1842 } 1846 }
1843 1847
1844 bool PepperPluginInstanceImpl::CanRotateView() { 1848 bool PepperPluginInstanceImpl::CanRotateView() {
1845 if (!LoadPdfInterface() || module()->is_crashed()) 1849 if (!LoadPdfInterface() || module()->is_crashed())
1846 return false; 1850 return false;
1847 1851
1848 return true; 1852 return true;
1849 } 1853 }
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
3316 3320
3317 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { 3321 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() {
3318 if (initialized_ && !javascript_used_ && is_flash_plugin_) { 3322 if (initialized_ && !javascript_used_ && is_flash_plugin_) {
3319 javascript_used_ = true; 3323 javascript_used_ = true;
3320 RenderThread::Get()->RecordAction( 3324 RenderThread::Get()->RecordAction(
3321 base::UserMetricsAction("Flash.JavaScriptUsed")); 3325 base::UserMetricsAction("Flash.JavaScriptUsed"));
3322 } 3326 }
3323 } 3327 }
3324 3328
3325 } // namespace content 3329 } // namespace content
OLDNEW
« no previous file with comments | « components/printing/renderer/print_web_view_helper.cc ('k') | pdf/instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698