| 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 12 matching lines...) Expand all Loading... |
| 23 #include "content/public/browser/web_contents_view_delegate.h" | 23 #include "content/public/browser/web_contents_view_delegate.h" |
| 24 #include "skia/ext/skia_utils_mac.h" | 24 #include "skia/ext/skia_utils_mac.h" |
| 25 #import "third_party/mozilla/NSPasteboard+Utils.h" | 25 #import "third_party/mozilla/NSPasteboard+Utils.h" |
| 26 #include "ui/base/clipboard/custom_data_helper.h" | 26 #include "ui/base/clipboard/custom_data_helper.h" |
| 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::RenderWidgetHostView; | 34 using content::RenderWidgetHostView; |
| 35 using content::RenderWidgetHostViewMac; |
| 34 using content::WebContents; | 36 using content::WebContents; |
| 35 | 37 |
| 36 // Ensure that the WebKit::WebDragOperation enum values stay in sync with | 38 // Ensure that the WebKit::WebDragOperation enum values stay in sync with |
| 37 // NSDragOperation constants, since the code below static_casts between 'em. | 39 // NSDragOperation constants, since the code below static_casts between 'em. |
| 38 #define COMPILE_ASSERT_MATCHING_ENUM(name) \ | 40 #define COMPILE_ASSERT_MATCHING_ENUM(name) \ |
| 39 COMPILE_ASSERT(int(NS##name) == int(WebKit::Web##name), enum_mismatch_##name) | 41 COMPILE_ASSERT(int(NS##name) == int(WebKit::Web##name), enum_mismatch_##name) |
| 40 COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); | 42 COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); |
| 41 COMPILE_ASSERT_MATCHING_ENUM(DragOperationCopy); | 43 COMPILE_ASSERT_MATCHING_ENUM(DragOperationCopy); |
| 42 COMPILE_ASSERT_MATCHING_ENUM(DragOperationLink); | 44 COMPILE_ASSERT_MATCHING_ENUM(DragOperationLink); |
| 43 COMPILE_ASSERT_MATCHING_ENUM(DragOperationGeneric); | 45 COMPILE_ASSERT_MATCHING_ENUM(DragOperationGeneric); |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 [[[notification userInfo] objectForKey:kSelectionDirection] | 525 [[[notification userInfo] objectForKey:kSelectionDirection] |
| 524 unsignedIntegerValue]; | 526 unsignedIntegerValue]; |
| 525 if (direction == NSDirectSelection) | 527 if (direction == NSDirectSelection) |
| 526 return; | 528 return; |
| 527 | 529 |
| 528 [self webContents]-> | 530 [self webContents]-> |
| 529 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 531 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
| 530 } | 532 } |
| 531 | 533 |
| 532 @end | 534 @end |
| OLD | NEW |