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

Unified Diff: content/renderer/render_view_impl.cc

Issue 1813143002: Remove a bunch of NPAPI quirks and related support code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_windowed_plugins
Patch Set: rebase Created 4 years, 9 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
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index e5052e8326f85431ec119ab943d71c31c1b0d13c..a88549a1f45111a39fa765bcb9c0e9d72ee7d800 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -638,9 +638,6 @@ RenderViewImpl::RenderViewImpl(CompositorDependencies* compositor_deps,
#if defined(OS_ANDROID)
expected_content_intent_id_(0),
#endif
-#if defined(OS_WIN)
- focused_plugin_id_(-1),
-#endif
#if defined(ENABLE_PLUGINS)
focused_pepper_plugin_(NULL),
pepper_last_mouse_event_target_(NULL),
@@ -1210,15 +1207,6 @@ void RenderViewImpl::UnregisterPluginDelegate(
plugin_delegates_.erase(delegate);
}
-#if defined(OS_WIN)
-void RenderViewImpl::PluginFocusChanged(bool focused, int plugin_id) {
- if (focused)
- focused_plugin_id_ = plugin_id;
- else
- focused_plugin_id_ = -1;
-}
-#endif
-
#if defined(OS_MACOSX)
void RenderViewImpl::PluginFocusChanged(bool focused, int plugin_id) {
Send(new ViewHostMsg_PluginFocusChanged(GetRoutingID(), focused, plugin_id));
@@ -2926,32 +2914,6 @@ void RenderViewImpl::OnImeSetComposition(
text, underlines, selection_start, selection_end);
return;
}
-
-#if defined(OS_WIN)
- // When a plugin has focus, we create platform-specific IME data used by
- // our IME emulator and send it directly to the focused plugin, i.e. we
- // bypass WebKit. (WebPluginDelegate dispatches this IME data only when its
- // instance ID is the same one as the specified ID.)
- if (focused_plugin_id_ >= 0) {
- std::vector<int> clauses;
- std::vector<int> target;
- for (size_t i = 0; i < underlines.size(); ++i) {
- clauses.push_back(underlines[i].startOffset);
- clauses.push_back(underlines[i].endOffset);
- if (underlines[i].thick) {
- target.clear();
- target.push_back(underlines[i].startOffset);
- target.push_back(underlines[i].endOffset);
- }
- }
- std::set<WebPluginDelegateProxy*>::iterator it;
- for (it = plugin_delegates_.begin(); it != plugin_delegates_.end(); ++it) {
- (*it)->ImeCompositionUpdated(text, clauses, target, selection_end,
- focused_plugin_id_);
- }
- return;
- }
-#endif // OS_WIN
#endif // ENABLE_PLUGINS
if (replacement_range.IsValid() && webview()) {
// Select the text in |replacement_range|, it will then be replaced by
@@ -2980,20 +2942,6 @@ void RenderViewImpl::OnImeConfirmComposition(
text, replacement_range, keep_selection);
return;
}
-#if defined(OS_WIN)
- // Same as OnImeSetComposition(), we send the text from IMEs directly to
- // plugins. When we send IME text directly to plugins, we should not send
- // it to WebKit to prevent WebKit from controlling IMEs.
- // TODO(thakis): Honor |replacement_range| for plugins?
- if (focused_plugin_id_ >= 0) {
- std::set<WebPluginDelegateProxy*>::iterator it;
- for (it = plugin_delegates_.begin();
- it != plugin_delegates_.end(); ++it) {
- (*it)->ImeCompositionCompleted(text, focused_plugin_id_);
- }
- return;
- }
-#endif // OS_WIN
#endif // ENABLE_PLUGINS
if (replacement_range.IsValid() && webview()) {
// Select the text in |replacement_range|, it will then be replaced by
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/test/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698