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

Side by Side Diff: Source/core/html/HTMLPlugInElement.cpp

Issue 24056004: Refactoring: toPluginView and toPluginDocument implemented but not used. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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 | « no previous file | Source/core/html/PluginDocument.cpp » ('j') | Source/web/WebFrameImpl.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 ASSERT(!m_instance); // cleared in detach() 56 ASSERT(!m_instance); // cleared in detach()
57 57
58 if (m_NPObject) { 58 if (m_NPObject) {
59 _NPN_ReleaseObject(m_NPObject); 59 _NPN_ReleaseObject(m_NPObject);
60 m_NPObject = 0; 60 m_NPObject = 0;
61 } 61 }
62 } 62 }
63 63
64 bool HTMLPlugInElement::canProcessDrag() const 64 bool HTMLPlugInElement::canProcessDrag() const
65 { 65 {
66 const PluginView* plugin = pluginWidget() && pluginWidget()->isPluginView() ? static_cast<const PluginView*>(pluginWidget()) : 0; 66 const PluginView* plugin = pluginWidget() && pluginWidget()->isPluginView() ? toPluginView(pluginWidget()) : 0;
67 return plugin ? plugin->canProcessDrag() : false; 67 return plugin ? plugin->canProcessDrag() : false;
68 } 68 }
69 69
70 bool HTMLPlugInElement::willRespondToMouseClickEvents() 70 bool HTMLPlugInElement::willRespondToMouseClickEvents()
71 { 71 {
72 if (isDisabledFormControl()) 72 if (isDisabledFormControl())
73 return false; 73 return false;
74 RenderObject* r = renderer(); 74 RenderObject* r = renderer();
75 if (!r) 75 if (!r)
76 return false; 76 return false;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 { 213 {
214 document().updateLayoutIgnorePendingStylesheets(); 214 document().updateLayoutIgnorePendingStylesheets();
215 return existingRenderWidget(); 215 return existingRenderWidget();
216 } 216 }
217 217
218 bool HTMLPlugInElement::isKeyboardFocusable() const 218 bool HTMLPlugInElement::isKeyboardFocusable() const
219 { 219 {
220 if (!document().page()) 220 if (!document().page())
221 return false; 221 return false;
222 222
223 const PluginView* plugin = pluginWidget() && pluginWidget()->isPluginView() ? static_cast<const PluginView*>(pluginWidget()) : 0; 223 const PluginView* plugin = pluginWidget() && pluginWidget()->isPluginView() ? toPluginView(pluginWidget()) : 0;
224 if (plugin) 224 if (plugin)
225 return plugin->supportsKeyboardFocus(); 225 return plugin->supportsKeyboardFocus();
226 226
227 return false; 227 return false;
228 } 228 }
229 229
230 bool HTMLPlugInElement::isPluginElement() const 230 bool HTMLPlugInElement::isPluginElement() const
231 { 231 {
232 return true; 232 return true;
233 } 233 }
(...skipping 10 matching lines...) Expand all
244 244
245 NPObject* HTMLPlugInElement::getNPObject() 245 NPObject* HTMLPlugInElement::getNPObject()
246 { 246 {
247 ASSERT(document().frame()); 247 ASSERT(document().frame());
248 if (!m_NPObject) 248 if (!m_NPObject)
249 m_NPObject = document().frame()->script()->createScriptObjectForPluginEl ement(this); 249 m_NPObject = document().frame()->script()->createScriptObjectForPluginEl ement(this);
250 return m_NPObject; 250 return m_NPObject;
251 } 251 }
252 252
253 } 253 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/PluginDocument.cpp » ('j') | Source/web/WebFrameImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698