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

Side by Side Diff: webkit/glue/plugins/webplugin_delegate_impl.cc

Issue 5040: Fix painting problem with transparent plugins because plugins were ignoring t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/plugins/webplugin_delegate_impl.h ('k') | webkit/glue/webplugin_delegate.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "webkit/glue/plugins/webplugin_delegate_impl.h" 5 #include "webkit/glue/plugins/webplugin_delegate_impl.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/gfx/point.h" 9 #include "base/gfx/point.h"
10 #include "base/stats_counters.h" 10 #include "base/stats_counters.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 memset(&window_, 0, sizeof(window_)); 137 memset(&window_, 0, sizeof(window_));
138 138
139 const WebPluginInfo& plugin_info = instance_->plugin_lib()->plugin_info(); 139 const WebPluginInfo& plugin_info = instance_->plugin_lib()->plugin_info();
140 std::wstring filename = file_util::GetFilenameFromPath(plugin_info.file); 140 std::wstring filename = file_util::GetFilenameFromPath(plugin_info.file);
141 141
142 if (instance_->mime_type() == "application/x-shockwave-flash" || 142 if (instance_->mime_type() == "application/x-shockwave-flash" ||
143 filename == L"npswf32.dll") { 143 filename == L"npswf32.dll") {
144 // Flash only requests windowless plugins if we return a Mozilla user 144 // Flash only requests windowless plugins if we return a Mozilla user
145 // agent. 145 // agent.
146 instance_->set_use_mozilla_user_agent(); 146 instance_->set_use_mozilla_user_agent();
147 instance_->set_throttle_invalidate(true);
148 quirks_ |= PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE; 147 quirks_ |= PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE;
149 } else if (plugin_info.name.find(L"Windows Media Player") != 148 } else if (plugin_info.name.find(L"Windows Media Player") !=
150 std::wstring::npos) { 149 std::wstring::npos) {
151 // Windows Media Player needs two NPP_SetWindow calls. 150 // Windows Media Player needs two NPP_SetWindow calls.
152 quirks_ |= PLUGIN_QUIRK_SETWINDOW_TWICE; 151 quirks_ |= PLUGIN_QUIRK_SETWINDOW_TWICE;
153 } else if (instance_->mime_type() == "audio/x-pn-realaudio-plugin" || 152 } else if (instance_->mime_type() == "audio/x-pn-realaudio-plugin" ||
154 filename == L"nppl3260.dll") { 153 filename == L"nppl3260.dll") {
155 quirks_ |= PLUGIN_QUIRK_DONT_CALL_WND_PROC_RECURSIVELY; 154 quirks_ |= PLUGIN_QUIRK_DONT_CALL_WND_PROC_RECURSIVELY;
156 } else if (plugin_info.name.find(L"VLC Multimedia Plugin") != 155 } else if (plugin_info.name.find(L"VLC Multimedia Plugin") !=
157 std::wstring::npos) { 156 std::wstring::npos) {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 300
302 void WebPluginDelegateImpl::DidFinishLoadWithReason(NPReason reason) { 301 void WebPluginDelegateImpl::DidFinishLoadWithReason(NPReason reason) {
303 instance()->DidFinishLoadWithReason(reason); 302 instance()->DidFinishLoadWithReason(reason);
304 } 303 }
305 304
306 int WebPluginDelegateImpl::GetProcessId() { 305 int WebPluginDelegateImpl::GetProcessId() {
307 // We are in process, so the plugin pid is this current process pid. 306 // We are in process, so the plugin pid is this current process pid.
308 return ::GetCurrentProcessId(); 307 return ::GetCurrentProcessId();
309 } 308 }
310 309
311 HWND WebPluginDelegateImpl::GetWindowHandle() {
312 return instance()->window_handle();
313 }
314
315 void WebPluginDelegateImpl::SendJavaScriptStream(const std::string& url, 310 void WebPluginDelegateImpl::SendJavaScriptStream(const std::string& url,
316 const std::wstring& result, 311 const std::wstring& result,
317 bool success, 312 bool success,
318 bool notify_needed, 313 bool notify_needed,
319 int notify_data) { 314 int notify_data) {
320 instance()->SendJavaScriptStream(url, result, success, notify_needed, 315 instance()->SendJavaScriptStream(url, result, success, notify_needed,
321 notify_data); 316 notify_data);
322 } 317 }
323 318
324 void WebPluginDelegateImpl::DidReceiveManualResponse( 319 void WebPluginDelegateImpl::DidReceiveManualResponse(
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 } 1056 }
1062 1057
1063 return false; 1058 return false;
1064 } 1059 }
1065 1060
1066 void WebPluginDelegateImpl::OnUserGestureEnd() { 1061 void WebPluginDelegateImpl::OnUserGestureEnd() {
1067 user_gesture_message_posted_ = false; 1062 user_gesture_message_posted_ = false;
1068 instance()->PopPopupsEnabledState(); 1063 instance()->PopPopupsEnabledState();
1069 } 1064 }
1070 1065
OLDNEW
« no previous file with comments | « webkit/glue/plugins/webplugin_delegate_impl.h ('k') | webkit/glue/webplugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698