| 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/tab_contents/web_contents_view_mac.h" | 7 #import "content/browser/tab_contents/web_contents_view_mac.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #import "base/mac/scoped_sending_event.h" | 11 #import "base/mac/scoped_sending_event.h" |
| 12 #import "base/message_pump_mac.h" | 12 #import "base/message_pump_mac.h" |
| 13 #include "content/browser/renderer_host/render_view_host.h" | 13 #include "content/browser/renderer_host/render_view_host.h" |
| 14 #include "content/browser/renderer_host/render_view_host_factory.h" | 14 #include "content/browser/renderer_host/render_view_host_factory.h" |
| 15 #include "content/browser/renderer_host/render_widget_host.h" | 15 #include "content/browser/renderer_host/render_widget_host.h" |
| 16 #include "content/browser/renderer_host/render_widget_host_view_mac.h" | 16 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
| 17 #include "content/browser/tab_contents/popup_menu_helper_mac.h" | 17 #include "content/browser/tab_contents/popup_menu_helper_mac.h" |
| 18 #include "content/browser/tab_contents/tab_contents.h" | 18 #include "content/browser/tab_contents/tab_contents.h" |
| 19 #import "content/browser/tab_contents/web_drag_dest_mac.h" | 19 #import "content/browser/tab_contents/web_drag_dest_mac.h" |
| 20 #import "content/browser/tab_contents/web_drag_source_mac.h" | 20 #import "content/browser/tab_contents/web_drag_source_mac.h" |
| 21 #include "content/common/view_messages.h" | 21 #include "content/common/view_messages.h" |
| 22 #include "content/public/browser/web_contents_delegate.h" |
| 22 #include "content/public/browser/web_contents_view_mac_delegate.h" | 23 #include "content/public/browser/web_contents_view_mac_delegate.h" |
| 23 #include "content/public/browser/web_contents_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 #import "ui/base/cocoa/focus_tracker.h" | 26 #import "ui/base/cocoa/focus_tracker.h" |
| 27 | 27 |
| 28 using WebKit::WebDragOperation; | 28 using WebKit::WebDragOperation; |
| 29 using WebKit::WebDragOperationsMask; | 29 using WebKit::WebDragOperationsMask; |
| 30 using content::RenderWidgetHostView; |
| 30 using content::WebContents; | 31 using content::WebContents; |
| 31 | 32 |
| 32 // Ensure that the WebKit::WebDragOperation enum values stay in sync with | 33 // Ensure that the WebKit::WebDragOperation enum values stay in sync with |
| 33 // NSDragOperation constants, since the code below static_casts between 'em. | 34 // NSDragOperation constants, since the code below static_casts between 'em. |
| 34 #define COMPILE_ASSERT_MATCHING_ENUM(name) \ | 35 #define COMPILE_ASSERT_MATCHING_ENUM(name) \ |
| 35 COMPILE_ASSERT(int(NS##name) == int(WebKit::Web##name), enum_mismatch_##name) | 36 COMPILE_ASSERT(int(NS##name) == int(WebKit::Web##name), enum_mismatch_##name) |
| 36 COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); | 37 COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); |
| 37 COMPILE_ASSERT_MATCHING_ENUM(DragOperationCopy); | 38 COMPILE_ASSERT_MATCHING_ENUM(DragOperationCopy); |
| 38 COMPILE_ASSERT_MATCHING_ENUM(DragOperationLink); | 39 COMPILE_ASSERT_MATCHING_ENUM(DragOperationLink); |
| 39 COMPILE_ASSERT_MATCHING_ENUM(DragOperationGeneric); | 40 COMPILE_ASSERT_MATCHING_ENUM(DragOperationGeneric); |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 [[[notification userInfo] objectForKey:kSelectionDirection] | 605 [[[notification userInfo] objectForKey:kSelectionDirection] |
| 605 unsignedIntegerValue]; | 606 unsignedIntegerValue]; |
| 606 if (direction == NSDirectSelection) | 607 if (direction == NSDirectSelection) |
| 607 return; | 608 return; |
| 608 | 609 |
| 609 [self tabContents]-> | 610 [self tabContents]-> |
| 610 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 611 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
| 611 } | 612 } |
| 612 | 613 |
| 613 @end | 614 @end |
| OLD | NEW |