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

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

Issue 2729543002: Rename platform/Widget to platform/FrameViewBase in web. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.cpp ('k') | no next file » | 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 if (result != WebInputEventResult::NotHandled) { 1150 if (result != WebInputEventResult::NotHandled) {
1151 if (WebInputEvent::RawKeyDown == event.type()) { 1151 if (WebInputEvent::RawKeyDown == event.type()) {
1152 // Suppress the next keypress event unless the focused node is a plugin 1152 // Suppress the next keypress event unless the focused node is a plugin
1153 // node. (Flash needs these keypress events to handle non-US keyboards.) 1153 // node. (Flash needs these keypress events to handle non-US keyboards.)
1154 Element* element = focusedElement(); 1154 Element* element = focusedElement();
1155 if (element && element->layoutObject() && 1155 if (element && element->layoutObject() &&
1156 element->layoutObject()->isEmbeddedObject()) { 1156 element->layoutObject()->isEmbeddedObject()) {
1157 if (event.windowsKeyCode == VKEY_TAB) { 1157 if (event.windowsKeyCode == VKEY_TAB) {
1158 // If the plugin supports keyboard focus then we should not send a tab 1158 // If the plugin supports keyboard focus then we should not send a tab
1159 // keypress event. 1159 // keypress event.
1160 Widget* widget = toLayoutPart(element->layoutObject())->widget(); 1160 FrameViewBase* frameViewBase =
1161 if (widget && widget->isPluginContainer()) { 1161 toLayoutPart(element->layoutObject())->widget();
1162 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget); 1162 if (frameViewBase && frameViewBase->isPluginContainer()) {
1163 WebPluginContainerImpl* plugin =
1164 toWebPluginContainerImpl(frameViewBase);
1163 if (plugin && plugin->supportsKeyboardFocus()) 1165 if (plugin && plugin->supportsKeyboardFocus())
1164 m_suppressNextKeypressEvent = true; 1166 m_suppressNextKeypressEvent = true;
1165 } 1167 }
1166 } 1168 }
1167 } else { 1169 } else {
1168 m_suppressNextKeypressEvent = true; 1170 m_suppressNextKeypressEvent = true;
1169 } 1171 }
1170 } 1172 }
1171 return result; 1173 return result;
1172 } 1174 }
(...skipping 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after
3329 void WebViewImpl::performPluginAction(const WebPluginAction& action, 3331 void WebViewImpl::performPluginAction(const WebPluginAction& action,
3330 const WebPoint& location) { 3332 const WebPoint& location) {
3331 // FIXME: Location is probably in viewport coordinates 3333 // FIXME: Location is probably in viewport coordinates
3332 HitTestResult result = hitTestResultForRootFramePos(location); 3334 HitTestResult result = hitTestResultForRootFramePos(location);
3333 Node* node = result.innerNode(); 3335 Node* node = result.innerNode();
3334 if (!isHTMLObjectElement(*node) && !isHTMLEmbedElement(*node)) 3336 if (!isHTMLObjectElement(*node) && !isHTMLEmbedElement(*node))
3335 return; 3337 return;
3336 3338
3337 LayoutObject* object = node->layoutObject(); 3339 LayoutObject* object = node->layoutObject();
3338 if (object && object->isLayoutPart()) { 3340 if (object && object->isLayoutPart()) {
3339 Widget* widget = toLayoutPart(object)->widget(); 3341 FrameViewBase* frameViewWidget = toLayoutPart(object)->widget();
3340 if (widget && widget->isPluginContainer()) { 3342 if (frameViewWidget && frameViewWidget->isPluginContainer()) {
3341 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget); 3343 WebPluginContainerImpl* plugin =
3344 toWebPluginContainerImpl(frameViewWidget);
3342 switch (action.type) { 3345 switch (action.type) {
3343 case WebPluginAction::Rotate90Clockwise: 3346 case WebPluginAction::Rotate90Clockwise:
3344 plugin->plugin()->rotateView(WebPlugin::RotationType90Clockwise); 3347 plugin->plugin()->rotateView(WebPlugin::RotationType90Clockwise);
3345 break; 3348 break;
3346 case WebPluginAction::Rotate90Counterclockwise: 3349 case WebPluginAction::Rotate90Counterclockwise:
3347 plugin->plugin()->rotateView( 3350 plugin->plugin()->rotateView(
3348 WebPlugin::RotationType90Counterclockwise); 3351 WebPlugin::RotationType90Counterclockwise);
3349 break; 3352 break;
3350 default: 3353 default:
3351 NOTREACHED(); 3354 NOTREACHED();
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
4163 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4166 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4164 return nullptr; 4167 return nullptr;
4165 return focusedFrame; 4168 return focusedFrame;
4166 } 4169 }
4167 4170
4168 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4171 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4169 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4172 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4170 } 4173 }
4171 4174
4172 } // namespace blink 4175 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698