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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 1192
1193 LocalFrame* WebFrameWidgetImpl::FocusedLocalFrameInWidget() const { 1193 LocalFrame* WebFrameWidgetImpl::FocusedLocalFrameInWidget() const {
1194 LocalFrame* frame = GetPage()->GetFocusController().FocusedFrame(); 1194 LocalFrame* frame = GetPage()->GetFocusController().FocusedFrame();
1195 return (frame && frame->LocalFrameRoot() == local_root_->GetFrame()) 1195 return (frame && frame->LocalFrameRoot() == local_root_->GetFrame())
1196 ? frame 1196 ? frame
1197 : nullptr; 1197 : nullptr;
1198 } 1198 }
1199 1199
1200 WebPlugin* WebFrameWidgetImpl::FocusedPluginIfInputMethodSupported( 1200 WebPlugin* WebFrameWidgetImpl::FocusedPluginIfInputMethodSupported(
1201 LocalFrame* frame) const { 1201 LocalFrame* frame) const {
1202 WebPluginContainerBase* container = 1202 if (frame) {
dcheng 2017/05/19 09:07:02 Do you know if this check is actually needed? I wo
slangley 2017/05/21 23:53:32 Deleted.
1203 WebLocalFrameImpl::CurrentPluginContainer(frame); 1203 WebPluginContainerBase* container = frame->GetWebPluginContainerBase();
1204 if (container && container->SupportsInputMethod()) 1204 if (container && container->SupportsInputMethod())
1205 return container->Plugin(); 1205 return container->Plugin();
1206 }
1206 return nullptr; 1207 return nullptr;
1207 } 1208 }
1208 1209
1209 LocalFrame* WebFrameWidgetImpl::FocusedLocalFrameAvailableForIme() const { 1210 LocalFrame* WebFrameWidgetImpl::FocusedLocalFrameAvailableForIme() const {
1210 if (!ime_accept_events_) 1211 if (!ime_accept_events_)
1211 return nullptr; 1212 return nullptr;
1212 return FocusedLocalFrameInWidget(); 1213 return FocusedLocalFrameInWidget();
1213 } 1214 }
1214 1215
1215 } // namespace blink 1216 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698