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

Side by Side 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, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "core/frame/RemoteFrameView.h" 5 #include "core/frame/RemoteFrameView.h"
6 6
7 #include "core/dom/IntersectionObserverEntry.h" 7 #include "core/dom/IntersectionObserverEntry.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/RemoteFrame.h" 10 #include "core/frame/RemoteFrame.h"
11 #include "core/frame/RemoteFrameClient.h" 11 #include "core/frame/RemoteFrameClient.h"
12 #include "core/html/HTMLFrameOwnerElement.h" 12 #include "core/html/HTMLFrameOwnerElement.h"
13 #include "core/layout/LayoutView.h" 13 #include "core/layout/LayoutView.h"
14 #include "core/layout/api/LayoutPartItem.h" 14 #include "core/layout/api/LayoutPartItem.h"
15 #include "core/paint/RemoteFramePainter.h"
16 #include "third_party/WebKit/Source/platform/graphics/GraphicsContext.h"
17 #include "third_party/WebKit/Source/platform/graphics/paint/CullRect.h"
15 18
16 namespace blink { 19 namespace blink {
17 20
18 RemoteFrameView::RemoteFrameView(RemoteFrame* remoteFrame) 21 RemoteFrameView::RemoteFrameView(RemoteFrame* remoteFrame)
19 : m_remoteFrame(remoteFrame) { 22 : m_remoteFrame(remoteFrame) {
20 ASSERT(remoteFrame); 23 ASSERT(remoteFrame);
21 } 24 }
22 25
23 RemoteFrameView::~RemoteFrameView() {} 26 RemoteFrameView::~RemoteFrameView() {}
24 27
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 if (isParentVisible() == visible) 135 if (isParentVisible() == visible)
133 return; 136 return;
134 137
135 Widget::setParentVisible(visible); 138 Widget::setParentVisible(visible);
136 if (!isSelfVisible()) 139 if (!isSelfVisible())
137 return; 140 return;
138 141
139 m_remoteFrame->client()->visibilityChanged(isVisible()); 142 m_remoteFrame->client()->visibilityChanged(isVisible());
140 } 143 }
141 144
145 void RemoteFrameView::paint(GraphicsContext& context,
146 const CullRect& rect) const {
147 if (!context.printing())
148 return;
149
150 IntRect bound(frameRect());
151 if (!rect.intersectsCullRect(bound))
152 return;
153
154 RemoteFramePainter(*this).paint(context, rect);
155 }
156
157 int RemoteFrameView::print(const IntRect& rect, int pageNum) const {
158 return m_remoteFrame->client()->print(rect, pageNum);
159 }
160
161 LayoutRect RemoteFrameView::visualRect() const {
162 return LayoutRect(frameRect());
163 }
164
165 String RemoteFrameView::debugName() const {
166 return "out of process frame";
167 }
168
142 DEFINE_TRACE(RemoteFrameView) { 169 DEFINE_TRACE(RemoteFrameView) {
143 visitor->trace(m_remoteFrame); 170 visitor->trace(m_remoteFrame);
144 Widget::trace(visitor); 171 Widget::trace(visitor);
145 } 172 }
146 173
147 } // namespace blink 174 } // namespace blink
OLDNEW
« 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