OLD | NEW |
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 25 matching lines...) Expand all Loading... |
36 #if defined(USE_SKIA) | 36 #if defined(USE_SKIA) |
37 #include "skia/ext/skia_utils_mac.h" | 37 #include "skia/ext/skia_utils_mac.h" |
38 #endif | 38 #endif |
39 | 39 |
40 using WebKit::WebCursorInfo; | 40 using WebKit::WebCursorInfo; |
41 using WebKit::WebKeyboardEvent; | 41 using WebKit::WebKeyboardEvent; |
42 using WebKit::WebInputEvent; | 42 using WebKit::WebInputEvent; |
43 using WebKit::WebMouseEvent; | 43 using WebKit::WebMouseEvent; |
44 using WebKit::WebMouseWheelEvent; | 44 using WebKit::WebMouseWheelEvent; |
45 | 45 |
| 46 #ifndef NP_NO_CARBON |
| 47 // QuickdrawAPI.h is no longer included in the 10.7 SDK, but the symbols are |
| 48 // still exported by QD.framework (a subframework of ApplicationServices). |
| 49 // http://developer.apple.com/legacy/mac/library/documentation/Carbon/reference/
QuickDraw_Ref/QuickDraw_Ref.pdf |
| 50 extern "C" void SetRect( |
| 51 Rect* r, short left, short top, short right, short bottom); |
| 52 extern "C" void OffsetRect(Rect* r, short dh, short dv); |
| 53 #endif |
| 54 |
46 // Important implementation notes: The Mac definition of NPAPI, particularly | 55 // Important implementation notes: The Mac definition of NPAPI, particularly |
47 // the distinction between windowed and windowless modes, differs from the | 56 // the distinction between windowed and windowless modes, differs from the |
48 // Windows and Linux definitions. Most of those differences are | 57 // Windows and Linux definitions. Most of those differences are |
49 // accomodated by the WebPluginDelegate class. | 58 // accomodated by the WebPluginDelegate class. |
50 | 59 |
51 namespace webkit { | 60 namespace webkit { |
52 namespace npapi { | 61 namespace npapi { |
53 | 62 |
54 namespace { | 63 namespace { |
55 | 64 |
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 HIPoint mouse_location; | 1077 HIPoint mouse_location; |
1069 HIGetMousePosition(kHICoordSpaceScreenPixel, NULL, &mouse_location); | 1078 HIGetMousePosition(kHICoordSpaceScreenPixel, NULL, &mouse_location); |
1070 np_event.where.h = mouse_location.x; | 1079 np_event.where.h = mouse_location.x; |
1071 np_event.where.v = mouse_location.y; | 1080 np_event.where.v = mouse_location.y; |
1072 instance()->NPP_HandleEvent(&np_event); | 1081 instance()->NPP_HandleEvent(&np_event); |
1073 } | 1082 } |
1074 #endif // !NP_NO_CARBON | 1083 #endif // !NP_NO_CARBON |
1075 | 1084 |
1076 } // namespace npapi | 1085 } // namespace npapi |
1077 } // namespace webkit | 1086 } // namespace webkit |
OLD | NEW |