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

Unified Diff: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp

Issue 2790283002: Use PluginView type rather than FrameViewBase for v8 Script object. (Closed)
Patch Set: Format if/return as per comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
index 9eb65ef0dbf4bb2bf62f5aafb4e2c845cc1624d4..d596e313ddac407315aa006accb080faddbac240 100644
--- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
@@ -153,8 +153,7 @@ bool HTMLPlugInElement::requestObjectInternal(
}
bool HTMLPlugInElement::canProcessDrag() const {
- return pluginWidget() && pluginWidget()->isPluginView() &&
- toPluginView(pluginWidget())->canProcessDrag();
+ return pluginWidget() && pluginWidget()->canProcessDrag();
}
bool HTMLPlugInElement::canStartSelection() const {
@@ -334,7 +333,7 @@ SharedPersistent<v8::Object>* HTMLPlugInElement::pluginWrapper() {
// return the cached allocated Bindings::Instance. Not supporting this
// edge-case is OK.
if (!m_pluginWrapper) {
- FrameViewBase* plugin;
+ PluginView* plugin;
if (m_persistedPlugin)
plugin = m_persistedPlugin.get();
@@ -342,14 +341,16 @@ SharedPersistent<v8::Object>* HTMLPlugInElement::pluginWrapper() {
plugin = pluginWidget();
if (plugin)
- m_pluginWrapper = frame->script().createPluginWrapper(plugin);
+ m_pluginWrapper = frame->script().createPluginWrapper(*plugin);
}
return m_pluginWrapper.get();
}
-FrameViewBase* HTMLPlugInElement::pluginWidget() const {
- if (LayoutPart* layoutPart = layoutPartForJSBindings())
- return layoutPart->frameViewBase();
+PluginView* HTMLPlugInElement::pluginWidget() const {
+ LayoutPart* layoutPart = layoutPartForJSBindings();
+ if (layoutPart && layoutPart->frameViewBase() &&
+ layoutPart->frameViewBase()->isPluginView())
+ return toPluginView(layoutPart->frameViewBase());
return nullptr;
}
@@ -424,8 +425,7 @@ bool HTMLPlugInElement::isKeyboardFocusable() const {
if (HTMLFrameOwnerElement::isKeyboardFocusable())
return true;
return document().isActive() && pluginWidget() &&
- pluginWidget()->isPluginView() &&
- toPluginView(pluginWidget())->supportsKeyboardFocus();
+ pluginWidget()->supportsKeyboardFocus();
}
bool HTMLPlugInElement::hasCustomFocusLogic() const {
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698