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

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

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits Created 3 years, 11 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 "core/events/KeyboardEvent.h" 7 #include "core/events/KeyboardEvent.h"
8 #include "core/events/MouseEvent.h" 8 #include "core/events/MouseEvent.h"
9 #include "core/events/WheelEvent.h" 9 #include "core/events/WheelEvent.h"
10 #include "core/frame/RemoteFrame.h" 10 #include "core/frame/RemoteFrame.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 if (event->isKeyboardEvent()) 157 if (event->isKeyboardEvent())
158 webEvent = WTF::wrapUnique( 158 webEvent = WTF::wrapUnique(
159 new WebKeyboardEventBuilder(*static_cast<KeyboardEvent*>(event))); 159 new WebKeyboardEventBuilder(*static_cast<KeyboardEvent*>(event)));
160 else if (event->isMouseEvent()) 160 else if (event->isMouseEvent())
161 webEvent = WTF::wrapUnique(new WebMouseEventBuilder( 161 webEvent = WTF::wrapUnique(new WebMouseEventBuilder(
162 m_webFrame->frame()->view(), 162 m_webFrame->frame()->view(),
163 m_webFrame->toImplBase()->frame()->ownerLayoutItem(), 163 m_webFrame->toImplBase()->frame()->ownerLayoutItem(),
164 *static_cast<MouseEvent*>(event))); 164 *static_cast<MouseEvent*>(event)));
165 165
166 // Other or internal Blink events should not be forwarded. 166 // Other or internal Blink events should not be forwarded.
167 if (!webEvent || webEvent->type == WebInputEvent::Undefined) 167 if (!webEvent || webEvent->type() == WebInputEvent::Undefined)
168 return; 168 return;
169 169
170 m_webFrame->client()->forwardInputEvent(webEvent.get()); 170 m_webFrame->client()->forwardInputEvent(webEvent.get());
171 } 171 }
172 172
173 void RemoteFrameClientImpl::frameRectsChanged(const IntRect& frameRect) { 173 void RemoteFrameClientImpl::frameRectsChanged(const IntRect& frameRect) {
174 m_webFrame->client()->frameRectsChanged(frameRect); 174 m_webFrame->client()->frameRectsChanged(frameRect);
175 } 175 }
176 176
177 void RemoteFrameClientImpl::advanceFocus(WebFocusType type, 177 void RemoteFrameClientImpl::advanceFocus(WebFocusType type,
178 LocalFrame* source) { 178 LocalFrame* source) {
179 m_webFrame->client()->advanceFocus(type, 179 m_webFrame->client()->advanceFocus(type,
180 WebLocalFrameImpl::fromFrame(source)); 180 WebLocalFrameImpl::fromFrame(source));
181 } 181 }
182 182
183 void RemoteFrameClientImpl::visibilityChanged(bool visible) { 183 void RemoteFrameClientImpl::visibilityChanged(bool visible) {
184 m_webFrame->client()->visibilityChanged(visible); 184 m_webFrame->client()->visibilityChanged(visible);
185 } 185 }
186 186
187 void RemoteFrameClientImpl::setHasReceivedUserGesture() { 187 void RemoteFrameClientImpl::setHasReceivedUserGesture() {
188 m_webFrame->client()->setHasReceivedUserGesture(); 188 m_webFrame->client()->setHasReceivedUserGesture();
189 } 189 }
190 190
191 } // namespace blink 191 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/PageWidgetDelegate.cpp ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698