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

Side by Side Diff: Source/web/WebPluginContainerImpl.cpp

Issue 1165103004: printPage to return void instead of bool (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaseline fixes Created 5 years, 6 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 | « Source/web/WebPluginContainerImpl.h ('k') | Source/web/tests/WebPluginContainerTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 bool WebPluginContainerImpl::getPrintPresetOptionsFromDocument(WebPrintPresetOpt ions* presetOptions) const 345 bool WebPluginContainerImpl::getPrintPresetOptionsFromDocument(WebPrintPresetOpt ions* presetOptions) const
346 { 346 {
347 return m_webPlugin->getPrintPresetOptionsFromDocument(presetOptions); 347 return m_webPlugin->getPrintPresetOptionsFromDocument(presetOptions);
348 } 348 }
349 349
350 int WebPluginContainerImpl::printBegin(const WebPrintParams& printParams) const 350 int WebPluginContainerImpl::printBegin(const WebPrintParams& printParams) const
351 { 351 {
352 return m_webPlugin->printBegin(printParams); 352 return m_webPlugin->printBegin(printParams);
353 } 353 }
354 354
355 bool WebPluginContainerImpl::printPage(int pageNumber, GraphicsContext* gc, cons t IntRect& printRect) 355 void WebPluginContainerImpl::printPage(int pageNumber, GraphicsContext* gc, cons t IntRect& printRect)
356 { 356 {
357 LayoutObjectDrawingRecorder drawingRecorder(*gc, *m_element->layoutObject(), DisplayItem::Type::WebPlugin, printRect); 357 LayoutObjectDrawingRecorder drawingRecorder(*gc, *m_element->layoutObject(), DisplayItem::Type::WebPlugin, printRect);
358 if (drawingRecorder.canUseCachedDrawing()) 358 if (drawingRecorder.canUseCachedDrawing())
359 return true; 359 return;
360 gc->save(); 360 gc->save();
361 WebCanvas* canvas = gc->canvas(); 361 WebCanvas* canvas = gc->canvas();
362 bool ret = m_webPlugin->printPage(pageNumber, canvas); 362 // TODO: Remove third parameter when both blink and chromium changes land fo r bug496765
363 m_webPlugin->printPage(pageNumber, canvas, false);
363 gc->restore(); 364 gc->restore();
364 return ret;
365 } 365 }
366 366
367 void WebPluginContainerImpl::printEnd() 367 void WebPluginContainerImpl::printEnd()
368 { 368 {
369 m_webPlugin->printEnd(); 369 m_webPlugin->printEnd();
370 } 370 }
371 371
372 void WebPluginContainerImpl::copy() 372 void WebPluginContainerImpl::copy()
373 { 373 {
374 if (!m_webPlugin->hasSelection()) 374 if (!m_webPlugin->hasSelection())
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 for (size_t i = 0; i < cutOutRects.size(); i++) 973 for (size_t i = 0; i < cutOutRects.size(); i++)
974 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 974 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
975 } 975 }
976 976
977 bool WebPluginContainerImpl::pluginShouldPersist() const 977 bool WebPluginContainerImpl::pluginShouldPersist() const
978 { 978 {
979 return m_webPlugin->shouldPersist(); 979 return m_webPlugin->shouldPersist();
980 } 980 }
981 981
982 } // namespace blink 982 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebPluginContainerImpl.h ('k') | Source/web/tests/WebPluginContainerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698