OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #if !defined(__LP64__) | 5 #if !defined(__LP64__) |
6 | 6 |
7 #include <Carbon/Carbon.h> | 7 #include <Carbon/Carbon.h> |
8 | 8 |
9 #include "content/plugin/plugin_interpose_util_mac.h" | 9 #include "content/plugin/plugin_interpose_util_mac.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
11 #include "webkit/plugins/npapi/carbon_plugin_window_tracker_mac.h" | 11 #include "webkit/plugins/npapi/carbon_plugin_window_tracker_mac.h" |
12 | 12 |
13 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | 13 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" |
14 | 14 |
15 #if defined(MAC_OS_X_VERSION_10_7) | |
Mark Mentovai
2012/07/26 22:49:00
Since we can’t be sure there aren’t “fixed” versio
Nico
2012/07/26 22:53:46
Done.
| |
16 // QuickdrawAPI.h is no longer included in the 10.7 SDK, but the symbols are | |
17 // still exported by QD.framework (a subframework of ApplicationServices). | |
18 // http://developer.apple.com/legacy/mac/library/documentation/Carbon/reference/ QuickDraw_Ref/QuickDraw_Ref.pdf | |
19 extern "C" { | |
20 Boolean PtInRect(Point pt, const Rect* r); | |
21 void SetCursor(const Cursor* crsr); | |
22 } | |
23 #endif // defined(MAC_OS_X_VERSION_10_7) | |
24 | |
15 // Returns true if the given window is modal. | 25 // Returns true if the given window is modal. |
16 static bool IsModalWindow(WindowRef window) { | 26 static bool IsModalWindow(WindowRef window) { |
17 WindowModality modality = kWindowModalityNone; | 27 WindowModality modality = kWindowModalityNone; |
18 WindowRef modal_target = NULL; | 28 WindowRef modal_target = NULL; |
19 OSStatus status = GetWindowModality(window, &modality, &modal_target); | 29 OSStatus status = GetWindowModality(window, &modality, &modal_target); |
20 return (status == noErr) && (modality != kWindowModalityNone); | 30 return (status == noErr) && (modality != kWindowModalityNone); |
21 } | 31 } |
22 | 32 |
23 static bool IsContainingWindowActive(const OpaquePluginRef delegate) { | 33 static bool IsContainingWindowActive(const OpaquePluginRef delegate) { |
24 return mac_plugin_interposing::GetPluginWindowHasFocus(delegate); | 34 return mac_plugin_interposing::GetPluginWindowHasFocus(delegate); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 INTERPOSE_FUNCTION(DisposeWindow), | 194 INTERPOSE_FUNCTION(DisposeWindow), |
185 INTERPOSE_FUNCTION(HideWindow), | 195 INTERPOSE_FUNCTION(HideWindow), |
186 INTERPOSE_FUNCTION(ReleaseWindow), | 196 INTERPOSE_FUNCTION(ReleaseWindow), |
187 INTERPOSE_FUNCTION(DisposeDialog), | 197 INTERPOSE_FUNCTION(DisposeDialog), |
188 INTERPOSE_FUNCTION(FindWindow), | 198 INTERPOSE_FUNCTION(FindWindow), |
189 INTERPOSE_FUNCTION(SetThemeCursor), | 199 INTERPOSE_FUNCTION(SetThemeCursor), |
190 INTERPOSE_FUNCTION(SetCursor), | 200 INTERPOSE_FUNCTION(SetCursor), |
191 }; | 201 }; |
192 | 202 |
193 #endif // !__LP64__ | 203 #endif // !__LP64__ |
OLD | NEW |