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 #include "webkit/glue/webcursor.h" | 5 #include "webkit/glue/webcursor.h" |
6 | 6 |
7 #import <AppKit/AppKit.h> | 7 #import <AppKit/AppKit.h> |
8 #include <Carbon/Carbon.h> | 8 #include <Carbon/Carbon.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/mac/mac_util.h" | 11 #include "base/mac/mac_util.h" |
12 #include "base/mac/scoped_cftyperef.h" | 12 #include "base/mac/scoped_cftyperef.h" |
13 #include "base/memory/scoped_nsobject.h" | 13 #include "base/memory/scoped_nsobject.h" |
14 #include "grit/webkit_chromium_resources.h" | 14 #include "grit/webkit_chromium_resources.h" |
15 #include "skia/ext/skia_utils_mac.h" | 15 #include "skia/ext/skia_utils_mac.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" |
19 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
20 | 20 |
| 21 |
| 22 #if defined(MAC_OS_X_VERSION_10_7) && \ |
| 23 MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 |
| 24 // The 10.7 SDK no longer has QuickDraw headers. |
| 25 // http://developer.apple.com/legacy/mac/library/documentation/Carbon/reference/
QuickDraw_Ref/QuickDraw_Ref.pdf |
| 26 typedef short Bits16[16]; |
| 27 struct Cursor { |
| 28 Bits16 data; |
| 29 Bits16 mask; |
| 30 Point hotSpot; |
| 31 }; |
| 32 #endif // 10.7+ SDK |
| 33 |
21 using WebKit::WebCursorInfo; | 34 using WebKit::WebCursorInfo; |
22 using WebKit::WebImage; | 35 using WebKit::WebImage; |
23 using WebKit::WebSize; | 36 using WebKit::WebSize; |
24 | 37 |
25 // Declare symbols that are part of the 10.7 SDK. | 38 // Declare symbols that are part of the 10.7 SDK. |
26 #if !defined(MAC_OS_X_VERSION_10_7) || \ | 39 #if !defined(MAC_OS_X_VERSION_10_7) || \ |
27 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | 40 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 |
28 | 41 |
29 @interface NSCursor (LionSDKDeclarations) | 42 @interface NSCursor (LionSDKDeclarations) |
30 + (NSCursor*)IBeamCursorForVerticalLayout; | 43 + (NSCursor*)IBeamCursorForVerticalLayout; |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 return true; | 547 return true; |
535 } | 548 } |
536 | 549 |
537 void WebCursor::CleanupPlatformData() { | 550 void WebCursor::CleanupPlatformData() { |
538 return; | 551 return; |
539 } | 552 } |
540 | 553 |
541 void WebCursor::CopyPlatformData(const WebCursor& other) { | 554 void WebCursor::CopyPlatformData(const WebCursor& other) { |
542 return; | 555 return; |
543 } | 556 } |
OLD | NEW |