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

Side by Side Diff: third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp

Issue 2865953002: Move more users of WebLocalFrameImpl to WebLocalFrameBase. (Closed)
Patch Set: Convert DedicatedWorkerMessagingProxyProviderImpl to use WebLocalFrameBase. Created 3 years, 7 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 "web/RemoteFrameClientImpl.h" 5 #include "web/RemoteFrameClientImpl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "core/events/KeyboardEvent.h" 8 #include "core/events/KeyboardEvent.h"
9 #include "core/events/MouseEvent.h" 9 #include "core/events/MouseEvent.h"
10 #include "core/events/WheelEvent.h" 10 #include "core/events/WheelEvent.h"
11 #include "core/frame/RemoteFrame.h" 11 #include "core/frame/RemoteFrame.h"
12 #include "core/frame/RemoteFrameView.h" 12 #include "core/frame/RemoteFrameView.h"
13 #include "core/frame/WebLocalFrameBase.h"
13 #include "core/layout/api/LayoutItem.h" 14 #include "core/layout/api/LayoutItem.h"
14 #include "core/layout/api/LayoutPartItem.h" 15 #include "core/layout/api/LayoutPartItem.h"
15 #include "platform/exported/WrappedResourceRequest.h" 16 #include "platform/exported/WrappedResourceRequest.h"
16 #include "platform/geometry/IntRect.h" 17 #include "platform/geometry/IntRect.h"
17 #include "platform/weborigin/SecurityOrigin.h" 18 #include "platform/weborigin/SecurityOrigin.h"
18 #include "platform/weborigin/SecurityPolicy.h" 19 #include "platform/weborigin/SecurityPolicy.h"
19 #include "platform/wtf/PtrUtil.h" 20 #include "platform/wtf/PtrUtil.h"
20 #include "public/web/WebRemoteFrameClient.h" 21 #include "public/web/WebRemoteFrameClient.h"
21 #include "web/WebInputEventConversion.h" 22 #include "web/WebInputEventConversion.h"
22 #include "web/WebLocalFrameImpl.h"
23 #include "web/WebRemoteFrameImpl.h" 23 #include "web/WebRemoteFrameImpl.h"
24 24
25 namespace blink { 25 namespace blink {
26 26
27 namespace { 27 namespace {
28 28
29 // Convenience helper for frame tree helpers in FrameClient to reduce the amount 29 // Convenience helper for frame tree helpers in FrameClient to reduce the amount
30 // of null-checking boilerplate code. Since the frame tree is maintained in the 30 // of null-checking boilerplate code. Since the frame tree is maintained in the
31 // web/ layer, the frame tree helpers often have to deal with null WebFrames: 31 // web/ layer, the frame tree helpers often have to deal with null WebFrames:
32 // for example, a frame with no parent will return null for WebFrame::parent(). 32 // for example, a frame with no parent will return null for WebFrame::parent().
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // See https://crbug.com/501116. 125 // See https://crbug.com/501116.
126 return 2; 126 return 2;
127 } 127 }
128 128
129 void RemoteFrameClientImpl::ForwardPostMessage( 129 void RemoteFrameClientImpl::ForwardPostMessage(
130 MessageEvent* event, 130 MessageEvent* event,
131 PassRefPtr<SecurityOrigin> target, 131 PassRefPtr<SecurityOrigin> target,
132 LocalFrame* source_frame) const { 132 LocalFrame* source_frame) const {
133 if (web_frame_->Client()) 133 if (web_frame_->Client())
134 web_frame_->Client()->ForwardPostMessage( 134 web_frame_->Client()->ForwardPostMessage(
135 WebLocalFrameImpl::FromFrame(source_frame), web_frame_, 135 WebLocalFrameBase::FromFrame(source_frame), web_frame_,
136 WebSecurityOrigin(std::move(target)), WebDOMMessageEvent(event)); 136 WebSecurityOrigin(std::move(target)), WebDOMMessageEvent(event));
137 } 137 }
138 138
139 void RemoteFrameClientImpl::FrameRectsChanged(const IntRect& frame_rect) { 139 void RemoteFrameClientImpl::FrameRectsChanged(const IntRect& frame_rect) {
140 web_frame_->Client()->FrameRectsChanged(frame_rect); 140 web_frame_->Client()->FrameRectsChanged(frame_rect);
141 } 141 }
142 142
143 void RemoteFrameClientImpl::UpdateRemoteViewportIntersection( 143 void RemoteFrameClientImpl::UpdateRemoteViewportIntersection(
144 const IntRect& viewport_intersection) { 144 const IntRect& viewport_intersection) {
145 web_frame_->Client()->UpdateRemoteViewportIntersection(viewport_intersection); 145 web_frame_->Client()->UpdateRemoteViewportIntersection(viewport_intersection);
146 } 146 }
147 147
148 void RemoteFrameClientImpl::AdvanceFocus(WebFocusType type, 148 void RemoteFrameClientImpl::AdvanceFocus(WebFocusType type,
149 LocalFrame* source) { 149 LocalFrame* source) {
150 web_frame_->Client()->AdvanceFocus(type, 150 web_frame_->Client()->AdvanceFocus(type,
151 WebLocalFrameImpl::FromFrame(source)); 151 WebLocalFrameBase::FromFrame(source));
152 } 152 }
153 153
154 void RemoteFrameClientImpl::VisibilityChanged(bool visible) { 154 void RemoteFrameClientImpl::VisibilityChanged(bool visible) {
155 web_frame_->Client()->VisibilityChanged(visible); 155 web_frame_->Client()->VisibilityChanged(visible);
156 } 156 }
157 157
158 } // namespace blink 158 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698