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

Unified Diff: content/renderer/npapi/webplugin_delegate_proxy.cc

Issue 1815593002: Remove windowed NPAPI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make_test_plugin_windowless
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/npapi/webplugin_delegate_proxy.h ('k') | content/renderer/npapi/webplugin_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/npapi/webplugin_delegate_proxy.cc
diff --git a/content/renderer/npapi/webplugin_delegate_proxy.cc b/content/renderer/npapi/webplugin_delegate_proxy.cc
index 942dc716e1400ced193b28bb4c91743ec9afd6de..2e80b8585fcbb16bbe4ac41b223e6f1972071bd1 100644
--- a/content/renderer/npapi/webplugin_delegate_proxy.cc
+++ b/content/renderer/npapi/webplugin_delegate_proxy.cc
@@ -105,13 +105,12 @@ WebPluginDelegateProxy::WebPluginDelegateProxy(
: render_view_(render_view),
render_frame_(render_frame),
plugin_(plugin),
- uses_shared_bitmaps_(false),
+ uses_shared_bitmaps_(true),
#if defined(OS_MACOSX)
uses_compositor_(false),
#elif defined(OS_WIN)
dummy_activation_window_(NULL),
#endif
- window_(gfx::kNullPluginWindow),
mime_type_(mime_type),
instance_id_(MSG_ROUTING_NONE),
npobject_(NULL),
@@ -147,9 +146,6 @@ void WebPluginDelegateProxy::PluginDestroyed() {
dummy_activation_window_ = NULL;
#endif
- if (window_)
- WillDestroyWindow();
-
if (render_view_.get())
render_view_->UnregisterPluginDelegate(this);
@@ -298,7 +294,6 @@ bool WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(WebPluginDelegateProxy, msg)
- IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindow, OnSetWindow)
IPC_MESSAGE_HANDLER(PluginHostMsg_InvalidateRect, OnInvalidateRect)
IPC_MESSAGE_HANDLER(PluginHostMsg_GetWindowScriptNPObject,
OnGetWindowScriptNPObject)
@@ -333,11 +328,6 @@ bool WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) {
void WebPluginDelegateProxy::OnChannelError() {
if (plugin_) {
- if (window_) {
- // The actual WebPluginDelegate never got a chance to tell the WebPlugin
- // its window was going away. Do it on its behalf.
- WillDestroyWindow();
- }
plugin_->Invalidate();
}
if (channel_host_.get() && !channel_host_->expecting_shutdown()) {
@@ -716,23 +706,6 @@ void WebPluginDelegateProxy::ImeCompositionCompleted(const base::string16& text,
}
#endif // OS_MACOSX
-void WebPluginDelegateProxy::OnSetWindow(gfx::PluginWindowHandle window) {
-#if defined(OS_MACOSX)
- uses_shared_bitmaps_ = !window && !uses_compositor_;
-#else
- uses_shared_bitmaps_ = !window;
-#endif
- window_ = window;
- if (plugin_)
- plugin_->SetWindow(window);
-}
-
-void WebPluginDelegateProxy::WillDestroyWindow() {
- DCHECK(window_);
- plugin_->WillDestroyWindow(window_);
- window_ = gfx::kNullPluginWindow;
-}
-
#if defined(OS_WIN)
void WebPluginDelegateProxy::OnSetWindowlessData(
HANDLE modal_loop_pump_messages_event_handle,
@@ -916,10 +889,6 @@ void WebPluginDelegateProxy::OnStartIme() {
}
#endif
-gfx::PluginWindowHandle WebPluginDelegateProxy::GetPluginWindowHandle() {
- return window_;
-}
-
void WebPluginDelegateProxy::OnCancelDocumentLoad() {
plugin_->CancelDocumentLoad();
}
@@ -935,7 +904,7 @@ void WebPluginDelegateProxy::OnDidStopLoading() {
#if defined(OS_MACOSX)
void WebPluginDelegateProxy::OnAcceleratedPluginEnabledRendering() {
uses_compositor_ = true;
- OnSetWindow(gfx::kNullPluginWindow);
+ uses_shared_bitmaps_ = false;
}
void WebPluginDelegateProxy::OnAcceleratedPluginAllocatedIOSurface(
« no previous file with comments | « content/renderer/npapi/webplugin_delegate_proxy.h ('k') | content/renderer/npapi/webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698