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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2764313002: Move plugins to be stored in HTMLPlugInElement. (Closed)
Patch Set: Update comments about duplicating code 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index dd1498133ea2376db7e178e347b5668ae1933ae2..314ac9ce9a5b8c269618d35c3e3dd6a6c85f0adb 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -1209,11 +1209,11 @@ WebInputEventResult WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) {
if (event.windowsKeyCode == VKEY_TAB) {
// If the plugin supports keyboard focus then we should not send a tab
// keypress event.
- FrameViewBase* frameViewBase =
- toLayoutPart(element->layoutObject())->frameViewBase();
- if (frameViewBase && frameViewBase->isPluginContainer()) {
+ PluginView* pluginView =
+ toLayoutPart(element->layoutObject())->plugin();
+ if (pluginView && pluginView->isPluginContainer()) {
WebPluginContainerImpl* plugin =
- toWebPluginContainerImpl(frameViewBase);
+ toWebPluginContainerImpl(pluginView);
if (plugin && plugin->supportsKeyboardFocus())
m_suppressNextKeypressEvent = true;
}
@@ -3400,10 +3400,9 @@ void WebViewImpl::performPluginAction(const WebPluginAction& action,
LayoutObject* object = node->layoutObject();
if (object && object->isLayoutPart()) {
- FrameViewBase* frameViewWidget = toLayoutPart(object)->frameViewBase();
- if (frameViewWidget && frameViewWidget->isPluginContainer()) {
- WebPluginContainerImpl* plugin =
- toWebPluginContainerImpl(frameViewWidget);
+ PluginView* pluginView = toLayoutPart(object)->plugin();
+ if (pluginView && pluginView->isPluginContainer()) {
+ WebPluginContainerImpl* plugin = toWebPluginContainerImpl(pluginView);
switch (action.type) {
case WebPluginAction::Rotate90Clockwise:
plugin->plugin()->rotateView(WebPlugin::RotationType90Clockwise);

Powered by Google App Engine
This is Rietveld 408576698