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

Unified Diff: content/plugin/plugin_carbon_interpose_mac.cc

Issue 10928072: Remove all support for the Carbon NPAPI event model (Closed) Base URL: http://git.chromium.org/chromium/src.git@test-plugin-cocoa
Patch Set: Rebase Created 8 years, 3 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/common/plugin_messages.h ('k') | content/plugin/plugin_interpose_util_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/plugin/plugin_carbon_interpose_mac.cc
diff --git a/content/plugin/plugin_carbon_interpose_mac.cc b/content/plugin/plugin_carbon_interpose_mac.cc
index 6b71916e21dfeb57ea2936f822372154f8d17ad6..c4162f0b5243dd4227996e40ba3997eaee283ba0 100644
--- a/content/plugin/plugin_carbon_interpose_mac.cc
+++ b/content/plugin/plugin_carbon_interpose_mac.cc
@@ -8,7 +8,6 @@
#include "content/plugin/plugin_interpose_util_mac.h"
#include "ui/gfx/rect.h"
-#include "webkit/plugins/npapi/carbon_plugin_window_tracker_mac.h"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@@ -18,7 +17,6 @@
// still exported by QD.framework (a subframework of ApplicationServices).
// http://developer.apple.com/legacy/mac/library/documentation/Carbon/reference/QuickDraw_Ref/QuickDraw_Ref.pdf
extern "C" {
-Boolean PtInRect(Point pt, const Rect* r);
void SetCursor(const Cursor* crsr);
}
#endif // 10.7+ SDK
@@ -31,10 +29,6 @@ static bool IsModalWindow(WindowRef window) {
return (status == noErr) && (modality != kWindowModalityNone);
}
-static bool IsContainingWindowActive(const OpaquePluginRef delegate) {
- return mac_plugin_interposing::GetPluginWindowHasFocus(delegate);
-}
-
static CGRect CGRectForWindow(WindowRef window) {
CGRect bounds = { { 0, 0 }, { 0, 0 } };
HIWindowGetBounds(window, kWindowContentRgn, kHICoordSpace72DPIGlobal,
@@ -70,22 +64,6 @@ static void OnPluginWindowSelected(WindowRef window) {
#pragma mark -
-static Boolean ChromePluginIsWindowActive(WindowRef window) {
- const OpaquePluginRef delegate =
- webkit::npapi::CarbonPluginWindowTracker::SharedInstance()->
- GetDelegateForDummyWindow(window);
- return delegate ? IsContainingWindowActive(delegate)
- : IsWindowActive(window);
-}
-
-static Boolean ChromePluginIsWindowHilited(WindowRef window) {
- const OpaquePluginRef delegate =
- webkit::npapi::CarbonPluginWindowTracker::SharedInstance()->
- GetDelegateForDummyWindow(window);
- return delegate ? IsContainingWindowActive(delegate)
- : IsWindowHilited(window);
-}
-
static void ChromePluginSelectWindow(WindowRef window) {
mac_plugin_interposing::SwitchToPluginProcess();
SelectWindow(window);
@@ -135,27 +113,6 @@ static void ChromePluginDisposeDialog(DialogRef dialog) {
OnPluginWindowClosed(window_info);
}
-static WindowPartCode ChromePluginFindWindow(Point point, WindowRef* window) {
- OpaquePluginRef delegate = mac_plugin_interposing::GetActiveDelegate();
- webkit::npapi::CarbonPluginWindowTracker* tracker =
- webkit::npapi::CarbonPluginWindowTracker::SharedInstance();
- WindowRef plugin_window = tracker->GetDummyWindowForDelegate(delegate);
- if (plugin_window) {
- // If plugin_window is non-NULL, then we are in the middle of routing an
- // event to the plugin, so we know it's destined for this window already,
- // so we don't have to worry that we'll be stealing an event meant for an
- // overlapping window.
- Rect window_bounds;
- GetWindowBounds(plugin_window, kWindowContentRgn, &window_bounds);
- if (PtInRect(point, &window_bounds)) {
- if (window)
- *window = plugin_window;
- return inContent;
- }
- }
- return FindWindow(point, window);
-}
-
static OSStatus ChromePluginSetThemeCursor(ThemeCursor cursor) {
OpaquePluginRef delegate = mac_plugin_interposing::GetActiveDelegate();
if (delegate) {
@@ -187,8 +144,6 @@ struct interpose_substitution {
__attribute__((used)) static const interpose_substitution substitutions[]
__attribute__((section("__DATA, __interpose"))) = {
- INTERPOSE_FUNCTION(IsWindowActive),
- INTERPOSE_FUNCTION(IsWindowHilited),
INTERPOSE_FUNCTION(SelectWindow),
INTERPOSE_FUNCTION(ShowWindow),
INTERPOSE_FUNCTION(ShowHide),
@@ -196,7 +151,6 @@ __attribute__((used)) static const interpose_substitution substitutions[]
INTERPOSE_FUNCTION(HideWindow),
INTERPOSE_FUNCTION(ReleaseWindow),
INTERPOSE_FUNCTION(DisposeDialog),
- INTERPOSE_FUNCTION(FindWindow),
INTERPOSE_FUNCTION(SetThemeCursor),
INTERPOSE_FUNCTION(SetCursor),
};
« no previous file with comments | « content/common/plugin_messages.h ('k') | content/plugin/plugin_interpose_util_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698