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

Unified Diff: third_party/WebKit/Source/core/frame/RemoteFrameView.cpp

Issue 2653963002: [Experimental] Supporting OOPIF printing
Patch Set: Rename service, fix for webview, and connect to DiscardableMemoryManager Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp b/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
index fb2ad9dfca532834c155c4a89822bf45bf60e5ae..abf5cfaf25c018877c1e4feae415c949dc14864b 100644
--- a/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
@@ -12,6 +12,9 @@
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/layout/LayoutView.h"
#include "core/layout/api/LayoutPartItem.h"
+#include "core/paint/RemoteFramePainter.h"
+#include "third_party/WebKit/Source/platform/graphics/GraphicsContext.h"
+#include "third_party/WebKit/Source/platform/graphics/paint/CullRect.h"
namespace blink {
@@ -139,6 +142,30 @@ void RemoteFrameView::setParentVisible(bool visible) {
m_remoteFrame->client()->visibilityChanged(isVisible());
}
+void RemoteFrameView::paint(GraphicsContext& context,
+ const CullRect& rect) const {
+ if (!context.printing())
+ return;
+
+ IntRect bound(frameRect());
+ if (!rect.intersectsCullRect(bound))
+ return;
+
+ RemoteFramePainter(*this).paint(context, rect);
+}
+
+int RemoteFrameView::print(const IntRect& rect, int pageNum) const {
+ return m_remoteFrame->client()->print(rect, pageNum);
+}
+
+LayoutRect RemoteFrameView::visualRect() const {
+ return LayoutRect(frameRect());
+}
+
+String RemoteFrameView::debugName() const {
+ return "out of process frame";
+}
+
DEFINE_TRACE(RemoteFrameView) {
visitor->trace(m_remoteFrame);
Widget::trace(visitor);
« no previous file with comments | « third_party/WebKit/Source/core/frame/RemoteFrameView.h ('k') | third_party/WebKit/Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698