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

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

Issue 17367: Fix layout test failures. Looks like keying the plugins based on OriginalFil... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 handle_event_message_filter_hook_(NULL), 138 handle_event_message_filter_hook_(NULL),
139 handle_event_pump_messages_event_(NULL), 139 handle_event_pump_messages_event_(NULL),
140 handle_event_depth_(0), 140 handle_event_depth_(0),
141 user_gesture_message_posted_(false), 141 user_gesture_message_posted_(false),
142 #pragma warning(suppress: 4355) // can use this 142 #pragma warning(suppress: 4355) // can use this
143 user_gesture_msg_factory_(this), 143 user_gesture_msg_factory_(this),
144 plugin_module_handle_(NULL) { 144 plugin_module_handle_(NULL) {
145 memset(&window_, 0, sizeof(window_)); 145 memset(&window_, 0, sizeof(window_));
146 146
147 const WebPluginInfo& plugin_info = instance_->plugin_lib()->plugin_info(); 147 const WebPluginInfo& plugin_info = instance_->plugin_lib()->plugin_info();
148 std::string filename = StringToLowerASCII(plugin_info.filename); 148 std::string filename =
149 WideToASCII(StringToLowerASCII(plugin_info.path.BaseName().value()));
149 150
150 if (instance_->mime_type() == "application/x-shockwave-flash" || 151 if (instance_->mime_type() == "application/x-shockwave-flash" ||
151 filename == "npswf32.dll") { 152 filename == "npswf32.dll") {
152 // Flash only requests windowless plugins if we return a Mozilla user 153 // Flash only requests windowless plugins if we return a Mozilla user
153 // agent. 154 // agent.
154 instance_->set_use_mozilla_user_agent(); 155 instance_->set_use_mozilla_user_agent();
155 quirks_ |= PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE; 156 quirks_ |= PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE;
156 quirks_ |= PLUGIN_QUIRK_PATCH_SETCURSOR; 157 quirks_ |= PLUGIN_QUIRK_PATCH_SETCURSOR;
157 } else if (filename == "nppdf32.dll") { 158 } else if (filename == "nppdf32.dll") {
158 // Check for the version number above or equal 9. 159 // Check for the version number above or equal 9.
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 1166
1166 // It is ok to pass NULL here to GetCursor as we are not looking for cursor 1167 // It is ok to pass NULL here to GetCursor as we are not looking for cursor
1167 // types defined by Webkit. 1168 // types defined by Webkit.
1168 HCURSOR previous_cursor = 1169 HCURSOR previous_cursor =
1169 current_plugin_instance_->current_windowless_cursor_.GetCursor(NULL); 1170 current_plugin_instance_->current_windowless_cursor_.GetCursor(NULL);
1170 1171
1171 current_plugin_instance_->current_windowless_cursor_.InitFromExternalCursor( 1172 current_plugin_instance_->current_windowless_cursor_.InitFromExternalCursor(
1172 cursor); 1173 cursor);
1173 return previous_cursor; 1174 return previous_cursor;
1174 } 1175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698