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

Side by Side Diff: content/plugin/webplugin_proxy.cc

Issue 1825253002: Revert of 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: 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 unified diff | Download patch
« no previous file with comments | « content/plugin/webplugin_proxy.h ('k') | content/renderer/npapi/webplugin_delegate_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/plugin/webplugin_proxy.h" 5 #include "content/plugin/webplugin_proxy.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if (plugin_element_) 69 if (plugin_element_)
70 WebBindings::releaseObject(plugin_element_); 70 WebBindings::releaseObject(plugin_element_);
71 if (window_npobject_) 71 if (window_npobject_)
72 WebBindings::releaseObject(window_npobject_); 72 WebBindings::releaseObject(window_npobject_);
73 } 73 }
74 74
75 bool WebPluginProxy::Send(IPC::Message* msg) { 75 bool WebPluginProxy::Send(IPC::Message* msg) {
76 return channel_->Send(msg); 76 return channel_->Send(msg);
77 } 77 }
78 78
79 #if defined(OS_WIN)
80 void WebPluginProxy::SetWindowlessData(
81 HANDLE pump_messages_event, gfx::NativeViewId dummy_activation_window) {
82 HANDLE pump_messages_event_for_renderer = NULL;
83 BrokerDuplicateHandle(pump_messages_event, channel_->peer_pid(),
84 &pump_messages_event_for_renderer,
85 SYNCHRONIZE | EVENT_MODIFY_STATE, 0);
86 DCHECK(pump_messages_event_for_renderer);
87 Send(new PluginHostMsg_SetWindowlessData(
88 route_id_, pump_messages_event_for_renderer, dummy_activation_window));
89 }
90 #endif
91
79 void WebPluginProxy::Invalidate() { 92 void WebPluginProxy::Invalidate() {
80 gfx::Rect rect(0, 0, 93 gfx::Rect rect(0, 0,
81 delegate_->GetRect().width(), 94 delegate_->GetRect().width(),
82 delegate_->GetRect().height()); 95 delegate_->GetRect().height());
83 InvalidateRect(rect); 96 InvalidateRect(rect);
84 } 97 }
85 98
86 void WebPluginProxy::InvalidateRect(const gfx::Rect& rect) { 99 void WebPluginProxy::InvalidateRect(const gfx::Rect& rect) {
87 #if defined(OS_MACOSX) 100 #if defined(OS_MACOSX)
88 // If this is a Core Animation plugin, all we need to do is inform the 101 // If this is a Core Animation plugin, all we need to do is inform the
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 GetContentClient()->SetActiveURL(page_url_); 468 GetContentClient()->SetActiveURL(page_url_);
456 469
457 Paint(damaged_rect); 470 Paint(damaged_rect);
458 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect)); 471 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect));
459 } 472 }
460 473
461 bool WebPluginProxy::IsOffTheRecord() { 474 bool WebPluginProxy::IsOffTheRecord() {
462 return channel_->incognito(); 475 return channel_->incognito();
463 } 476 }
464 477
478 #if defined(OS_WIN) && !defined(USE_AURA)
479 void WebPluginProxy::UpdateIMEStatus() {
480 // Retrieve the IME status from a plugin and send it to a renderer process
481 // when the plugin has updated it.
482 int input_type;
483 gfx::Rect caret_rect;
484 if (!delegate_->GetIMEStatus(&input_type, &caret_rect))
485 return;
486
487 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect));
488 }
489 #endif
490
465 } // namespace content 491 } // namespace content
OLDNEW
« no previous file with comments | « content/plugin/webplugin_proxy.h ('k') | content/renderer/npapi/webplugin_delegate_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698