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

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: Ensure we have a valid PluginView before using it. 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 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 return result; 1190 return result;
1191 } 1191 }
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(
1201 LocalFrame* frame) const {
1202 WebPluginContainerBase* container =
1203 WebLocalFrameImpl::CurrentPluginContainer(frame);
1204 if (container && container->SupportsInputMethod())
1205 return container->Plugin();
1206 return nullptr;
1207 }
1208
1209 LocalFrame* WebFrameWidgetImpl::FocusedLocalFrameAvailableForIme() const { 1200 LocalFrame* WebFrameWidgetImpl::FocusedLocalFrameAvailableForIme() const {
1210 if (!ime_accept_events_) 1201 if (!ime_accept_events_)
1211 return nullptr; 1202 return nullptr;
1212 return FocusedLocalFrameInWidget(); 1203 return FocusedLocalFrameInWidget();
1213 } 1204 }
1214 1205
1215 } // namespace blink 1206 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetImpl.h ('k') | third_party/WebKit/Source/web/WebInputMethodControllerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698