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 16 matching lines...) Expand all Loading... |
27 #import "ui/base/cocoa/focus_tracker.h" | 27 #import "ui/base/cocoa/focus_tracker.h" |
28 #include "ui/base/dragdrop/cocoa_dnd_util.h" | 28 #include "ui/base/dragdrop/cocoa_dnd_util.h" |
29 #include "ui/gfx/image/image_skia_util_mac.h" | 29 #include "ui/gfx/image/image_skia_util_mac.h" |
30 | 30 |
31 using WebKit::WebDragOperation; | 31 using WebKit::WebDragOperation; |
32 using WebKit::WebDragOperationsMask; | 32 using WebKit::WebDragOperationsMask; |
33 using content::PopupMenuHelper; | 33 using content::PopupMenuHelper; |
34 using content::RenderWidgetHostView; | 34 using content::RenderWidgetHostView; |
35 using content::RenderWidgetHostViewMac; | 35 using content::RenderWidgetHostViewMac; |
36 using content::WebContents; | 36 using content::WebContents; |
| 37 using content::WebContentsImpl; |
37 | 38 |
38 // Ensure that the WebKit::WebDragOperation enum values stay in sync with | 39 // Ensure that the WebKit::WebDragOperation enum values stay in sync with |
39 // NSDragOperation constants, since the code below static_casts between 'em. | 40 // NSDragOperation constants, since the code below static_casts between 'em. |
40 #define COMPILE_ASSERT_MATCHING_ENUM(name) \ | 41 #define COMPILE_ASSERT_MATCHING_ENUM(name) \ |
41 COMPILE_ASSERT(int(NS##name) == int(WebKit::Web##name), enum_mismatch_##name) | 42 COMPILE_ASSERT(int(NS##name) == int(WebKit::Web##name), enum_mismatch_##name) |
42 COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); | 43 COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); |
43 COMPILE_ASSERT_MATCHING_ENUM(DragOperationCopy); | 44 COMPILE_ASSERT_MATCHING_ENUM(DragOperationCopy); |
44 COMPILE_ASSERT_MATCHING_ENUM(DragOperationLink); | 45 COMPILE_ASSERT_MATCHING_ENUM(DragOperationLink); |
45 COMPILE_ASSERT_MATCHING_ENUM(DragOperationGeneric); | 46 COMPILE_ASSERT_MATCHING_ENUM(DragOperationGeneric); |
46 COMPILE_ASSERT_MATCHING_ENUM(DragOperationPrivate); | 47 COMPILE_ASSERT_MATCHING_ENUM(DragOperationPrivate); |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 [[[notification userInfo] objectForKey:kSelectionDirection] | 530 [[[notification userInfo] objectForKey:kSelectionDirection] |
530 unsignedIntegerValue]; | 531 unsignedIntegerValue]; |
531 if (direction == NSDirectSelection) | 532 if (direction == NSDirectSelection) |
532 return; | 533 return; |
533 | 534 |
534 [self webContents]-> | 535 [self webContents]-> |
535 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 536 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
536 } | 537 } |
537 | 538 |
538 @end | 539 @end |
OLD | NEW |