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

Unified Diff: third_party/WebKit/Source/web/ContextMenuClientImpl.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/ContextMenuClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
index 2d7e195b4f11ef323288bce29fe11fcd1e3d3aa7..71b6530fb57e9de55ff430a8ce00488ab049a6aa 100644
--- a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
@@ -252,11 +252,10 @@ bool ContextMenuClientImpl::showContextMenu(const ContextMenu* defaultMenu,
isHTMLEmbedElement(*r.innerNode())) {
LayoutObject* object = r.innerNode()->layoutObject();
if (object && object->isLayoutPart()) {
- FrameViewBase* frameViewBase = toLayoutPart(object)->frameViewBase();
- if (frameViewBase && frameViewBase->isPluginContainer()) {
+ PluginView* pluginView = toLayoutPart(object)->plugin();
+ if (pluginView && pluginView->isPluginContainer()) {
data.mediaType = WebContextMenuData::MediaTypePlugin;
- WebPluginContainerImpl* plugin =
- toWebPluginContainerImpl(toPluginView(frameViewBase));
+ WebPluginContainerImpl* plugin = toWebPluginContainerImpl(pluginView);
WebString text = plugin->plugin()->selectionAsText();
if (!text.isEmpty()) {
data.selectedText = text;

Powered by Google App Engine
This is Rietveld 408576698