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

Side by Side Diff: webkit/plugins/npapi/webplugin_delegate_impl_mac.mm

Issue 10823138: Disable support for the Mac NPAPI Carbon event model (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix string compare Created 8 years, 4 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 | « webkit/plugins/npapi/plugin_host.cc ('k') | no next file » | 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 #import <QuartzCore/QuartzCore.h> 6 #import <QuartzCore/QuartzCore.h>
7 7
8 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" 8 #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
9 9
10 #include <string> 10 #include <string>
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // where code to do so is surrounded by an #ifdef that excludes Mac OS X, or 315 // where code to do so is surrounded by an #ifdef that excludes Mac OS X, or
316 // destroyPlugin in WebNetscapePluginView.mm, for examples). 316 // destroyPlugin in WebNetscapePluginView.mm, for examples).
317 quirks_ |= PLUGIN_QUIRK_DONT_SET_NULL_WINDOW_HANDLE_ON_DESTROY; 317 quirks_ |= PLUGIN_QUIRK_DONT_SET_NULL_WINDOW_HANDLE_ON_DESTROY;
318 318
319 // Mac plugins don't expect to be unloaded, and they don't always do so 319 // Mac plugins don't expect to be unloaded, and they don't always do so
320 // cleanly, so don't unload them at shutdown. 320 // cleanly, so don't unload them at shutdown.
321 instance()->plugin_lib()->PreventLibraryUnload(); 321 instance()->plugin_lib()->PreventLibraryUnload();
322 322
323 #ifndef NP_NO_CARBON 323 #ifndef NP_NO_CARBON
324 if (instance()->event_model() == NPEventModelCarbon) { 324 if (instance()->event_model() == NPEventModelCarbon) {
325 // Carbon is no longer supported, but the test plugin has not yet been
326 // updated; allow the test plugin to continue, but kill any other plugin
327 // that tries to use Carbon.
328 // TODO(stuartmorgan): Remove all Carbon support once crbug.com/134359 is
329 // fixed.
330 const WebPluginInfo& plugin_info = instance_->plugin_lib()->plugin_info();
331 if (plugin_info.name != ASCIIToUTF16("Chromium NPAPI Test Plugin"))
332 return false;
333
325 // Create a stand-in for the browser window so that the plugin will have 334 // Create a stand-in for the browser window so that the plugin will have
326 // a non-NULL WindowRef to which it can refer. 335 // a non-NULL WindowRef to which it can refer.
327 CarbonPluginWindowTracker* window_tracker = 336 CarbonPluginWindowTracker* window_tracker =
328 CarbonPluginWindowTracker::SharedInstance(); 337 CarbonPluginWindowTracker::SharedInstance();
329 np_cg_context_.window = window_tracker->CreateDummyWindowForDelegate(this); 338 np_cg_context_.window = window_tracker->CreateDummyWindowForDelegate(this);
330 np_cg_context_.context = NULL; 339 np_cg_context_.context = NULL;
331 UpdateDummyWindowBounds(gfx::Point(0, 0)); 340 UpdateDummyWindowBounds(gfx::Point(0, 0));
332 } 341 }
333 #endif 342 #endif
334 343
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 HIPoint mouse_location; 1090 HIPoint mouse_location;
1082 HIGetMousePosition(kHICoordSpaceScreenPixel, NULL, &mouse_location); 1091 HIGetMousePosition(kHICoordSpaceScreenPixel, NULL, &mouse_location);
1083 np_event.where.h = mouse_location.x; 1092 np_event.where.h = mouse_location.x;
1084 np_event.where.v = mouse_location.y; 1093 np_event.where.v = mouse_location.y;
1085 instance()->NPP_HandleEvent(&np_event); 1094 instance()->NPP_HandleEvent(&np_event);
1086 } 1095 }
1087 #endif // !NP_NO_CARBON 1096 #endif // !NP_NO_CARBON
1088 1097
1089 } // namespace npapi 1098 } // namespace npapi
1090 } // namespace webkit 1099 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698