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) | |
Mark Mentovai
2012/07/26 22:49:00
Same.
| |
23 // The 10.7 SDK no longer has QuickDraw headers. | |
24 // http://developer.apple.com/legacy/mac/library/documentation/Carbon/reference/ QuickDraw_Ref/QuickDraw_Ref.pdf | |
25 typedef short Bits16[16]; | |
26 struct Cursor { | |
27 Bits16 data; | |
28 Bits16 mask; | |
29 Point hotSpot; | |
30 }; | |
31 #endif // defined(MAC_OS_X_VERSION_10_7) | |
32 | |
21 using WebKit::WebCursorInfo; | 33 using WebKit::WebCursorInfo; |
22 using WebKit::WebImage; | 34 using WebKit::WebImage; |
23 using WebKit::WebSize; | 35 using WebKit::WebSize; |
24 | 36 |
25 // Declare symbols that are part of the 10.7 SDK. | 37 // Declare symbols that are part of the 10.7 SDK. |
26 #if !defined(MAC_OS_X_VERSION_10_7) || \ | 38 #if !defined(MAC_OS_X_VERSION_10_7) || \ |
Mark Mentovai
2012/07/26 22:49:00
Kinda like what’s done here.
| |
27 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | 39 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 |
28 | 40 |
29 @interface NSCursor (LionSDKDeclarations) | 41 @interface NSCursor (LionSDKDeclarations) |
30 + (NSCursor*)IBeamCursorForVerticalLayout; | 42 + (NSCursor*)IBeamCursorForVerticalLayout; |
31 @end | 43 @end |
32 | 44 |
33 #endif // MAC_OS_X_VERSION_10_7 | 45 #endif // MAC_OS_X_VERSION_10_7 |
34 | 46 |
35 // Private interface to CoreCursor, as of Mac OS X 10.7. This is essentially the | 47 // Private interface to CoreCursor, as of Mac OS X 10.7. This is essentially the |
36 // implementation of WKCursor in WebKitSystemInterface. | 48 // implementation of WKCursor in WebKitSystemInterface. |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
534 return true; | 546 return true; |
535 } | 547 } |
536 | 548 |
537 void WebCursor::CleanupPlatformData() { | 549 void WebCursor::CleanupPlatformData() { |
538 return; | 550 return; |
539 } | 551 } |
540 | 552 |
541 void WebCursor::CopyPlatformData(const WebCursor& other) { | 553 void WebCursor::CopyPlatformData(const WebCursor& other) { |
542 return; | 554 return; |
543 } | 555 } |
OLD | NEW |