| 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 <Carbon/Carbon.h> | 5 #import <Carbon/Carbon.h> |
| 6 | 6 |
| 7 #import "content/browser/web_contents/web_contents_view_mac.h" | 7 #import "content/browser/web_contents/web_contents_view_mac.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 using content::PopupMenuHelper; | 36 using content::PopupMenuHelper; |
| 37 using content::RenderViewHostFactory; | 37 using content::RenderViewHostFactory; |
| 38 using content::RenderWidgetHostView; | 38 using content::RenderWidgetHostView; |
| 39 using content::RenderWidgetHostViewMac; | 39 using content::RenderWidgetHostViewMac; |
| 40 using content::WebContents; | 40 using content::WebContents; |
| 41 using content::WebContentsImpl; | 41 using content::WebContentsImpl; |
| 42 using content::WebContentsViewMac; | 42 using content::WebContentsViewMac; |
| 43 | 43 |
| 44 // Ensure that the blink::WebDragOperation enum values stay in sync with | 44 // Ensure that the blink::WebDragOperation enum values stay in sync with |
| 45 // NSDragOperation constants, since the code below static_casts between 'em. | 45 // NSDragOperation constants, since the code below static_casts between 'em. |
| 46 #define COMPILE_ASSERT_MATCHING_ENUM(name) \ | 46 #define STATIC_ASSERT_MATCHING_ENUM(name) \ |
| 47 COMPILE_ASSERT(int(NS##name) == int(blink::Web##name), enum_mismatch_##name) | 47 static_assert(int(NS##name) == int(blink::Web##name), "enum mismatch: " #name) |
| 48 COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); | 48 STATIC_ASSERT_MATCHING_ENUM(DragOperationNone); |
| 49 COMPILE_ASSERT_MATCHING_ENUM(DragOperationCopy); | 49 STATIC_ASSERT_MATCHING_ENUM(DragOperationCopy); |
| 50 COMPILE_ASSERT_MATCHING_ENUM(DragOperationLink); | 50 STATIC_ASSERT_MATCHING_ENUM(DragOperationLink); |
| 51 COMPILE_ASSERT_MATCHING_ENUM(DragOperationGeneric); | 51 STATIC_ASSERT_MATCHING_ENUM(DragOperationGeneric); |
| 52 COMPILE_ASSERT_MATCHING_ENUM(DragOperationPrivate); | 52 STATIC_ASSERT_MATCHING_ENUM(DragOperationPrivate); |
| 53 COMPILE_ASSERT_MATCHING_ENUM(DragOperationMove); | 53 STATIC_ASSERT_MATCHING_ENUM(DragOperationMove); |
| 54 COMPILE_ASSERT_MATCHING_ENUM(DragOperationDelete); | 54 STATIC_ASSERT_MATCHING_ENUM(DragOperationDelete); |
| 55 COMPILE_ASSERT_MATCHING_ENUM(DragOperationEvery); | 55 STATIC_ASSERT_MATCHING_ENUM(DragOperationEvery); |
| 56 | 56 |
| 57 @interface WebContentsViewCocoa (Private) | 57 @interface WebContentsViewCocoa (Private) |
| 58 - (id)initWithWebContentsViewMac:(WebContentsViewMac*)w; | 58 - (id)initWithWebContentsViewMac:(WebContentsViewMac*)w; |
| 59 - (void)registerDragTypes; | 59 - (void)registerDragTypes; |
| 60 - (void)setCurrentDragOperation:(NSDragOperation)operation; | 60 - (void)setCurrentDragOperation:(NSDragOperation)operation; |
| 61 - (DropData*)dropData; | 61 - (DropData*)dropData; |
| 62 - (void)startDragWithDropData:(const DropData&)dropData | 62 - (void)startDragWithDropData:(const DropData&)dropData |
| 63 dragOperationMask:(NSDragOperation)operationMask | 63 dragOperationMask:(NSDragOperation)operationMask |
| 64 image:(NSImage*)image | 64 image:(NSImage*)image |
| 65 offset:(NSPoint)offset; | 65 offset:(NSPoint)offset; |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 if (!webContents->should_normally_be_visible()) | 638 if (!webContents->should_normally_be_visible()) |
| 639 webContents->WasShown(); | 639 webContents->WasShown(); |
| 640 } else { | 640 } else { |
| 641 if (webContents->should_normally_be_visible()) | 641 if (webContents->should_normally_be_visible()) |
| 642 webContents->WasHidden(); | 642 webContents->WasHidden(); |
| 643 } | 643 } |
| 644 } | 644 } |
| 645 } | 645 } |
| 646 | 646 |
| 647 @end | 647 @end |
| OLD | NEW |