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

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

Issue 2888203006: Move the logic to retrieve the WebPluginContainer to LocalFrame and Node. (Closed)
Patch Set: Rename & format. Created 3 years, 7 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 753c293cb260a97f1339e69ef3709a3419527fa8..0c922461d1806c1400434605023b2f087c7cd5e3 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2419,10 +2419,11 @@ bool WebViewImpl::SelectionBounds(WebRect& anchor, WebRect& focus) const {
// TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as
// well. This code needs to be refactored (http://crbug.com/629721).
WebPlugin* WebViewImpl::FocusedPluginIfInputMethodSupported(LocalFrame* frame) {
- WebPluginContainerBase* container =
- WebLocalFrameImpl::CurrentPluginContainer(frame);
- if (container && container->SupportsInputMethod())
- return container->Plugin();
+ if (frame) {
dcheng 2017/05/19 09:07:02 Ditto: I think this is actually unused now
slangley 2017/05/21 23:53:33 Deleted.
+ WebPluginContainerBase* container = frame->GetWebPluginContainerBase();
+ if (container && container->SupportsInputMethod())
+ return container->Plugin();
+ }
return nullptr;
}
@@ -2909,7 +2910,7 @@ void WebViewImpl::PropagateZoomFactorToLocalFrameRoots(Frame* frame,
float zoom_factor) {
if (frame->IsLocalRoot()) {
LocalFrame* local_frame = ToLocalFrame(frame);
- if (!WebLocalFrameImpl::PluginContainerFromFrame(local_frame))
+ if (!local_frame->GetWebPluginContainerBase())
local_frame->SetPageZoomFactor(zoom_factor);
}
@@ -2961,7 +2962,7 @@ float WebViewImpl::TextZoomFactor() {
float WebViewImpl::SetTextZoomFactor(float text_zoom_factor) {
LocalFrame* frame = MainFrameImpl()->GetFrame();
- if (WebLocalFrameImpl::PluginContainerFromFrame(frame))
+ if (frame->GetWebPluginContainerBase())
return 1;
frame->SetTextZoomFactor(text_zoom_factor);

Powered by Google App Engine
This is Rietveld 408576698