| 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 #include "chrome/browser/tab_contents/moving_to_content/tab_contents_view_mac.h" | 7 #include "chrome/browser/tab_contents/moving_to_content/tab_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 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegat
e.h" | 13 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegat
e.h" |
| 14 #include "chrome/browser/tab_contents/render_view_context_menu_mac.h" | 14 #include "chrome/browser/tab_contents/render_view_context_menu_mac.h" |
| 15 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_mac.h" | 15 #include "chrome/browser/tab_contents/web_drag_bookmark_handler_mac.h" |
| 16 #import "chrome/browser/ui/cocoa/focus_tracker.h" | |
| 17 #import "chrome/browser/ui/cocoa/view_id_util.h" | 16 #import "chrome/browser/ui/cocoa/view_id_util.h" |
| 18 #include "content/browser/renderer_host/render_view_host.h" | 17 #include "content/browser/renderer_host/render_view_host.h" |
| 19 #include "content/browser/renderer_host/render_view_host_factory.h" | 18 #include "content/browser/renderer_host/render_view_host_factory.h" |
| 20 #include "content/browser/renderer_host/render_widget_host.h" | 19 #include "content/browser/renderer_host/render_widget_host.h" |
| 21 #include "content/browser/renderer_host/render_widget_host_view_mac.h" | 20 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
| 22 #include "content/browser/tab_contents/popup_menu_helper_mac.h" | 21 #include "content/browser/tab_contents/popup_menu_helper_mac.h" |
| 23 #include "content/browser/tab_contents/tab_contents.h" | 22 #include "content/browser/tab_contents/tab_contents.h" |
| 24 #import "content/browser/tab_contents/web_drag_dest_mac.h" | 23 #import "content/browser/tab_contents/web_drag_dest_mac.h" |
| 25 #import "content/browser/tab_contents/web_drag_source_mac.h" | 24 #import "content/browser/tab_contents/web_drag_source_mac.h" |
| 26 #include "content/common/view_messages.h" | 25 #include "content/common/view_messages.h" |
| 27 #include "content/public/browser/web_contents_delegate.h" | 26 #include "content/public/browser/web_contents_delegate.h" |
| 28 #include "skia/ext/skia_utils_mac.h" | 27 #include "skia/ext/skia_utils_mac.h" |
| 29 #import "third_party/mozilla/NSPasteboard+Utils.h" | 28 #import "third_party/mozilla/NSPasteboard+Utils.h" |
| 29 #import "ui/base/cocoa/focus_tracker.h" |
| 30 | 30 |
| 31 using WebKit::WebDragOperation; | 31 using WebKit::WebDragOperation; |
| 32 using WebKit::WebDragOperationsMask; | 32 using WebKit::WebDragOperationsMask; |
| 33 using content::WebContents; | 33 using content::WebContents; |
| 34 | 34 |
| 35 // Ensure that the WebKit::WebDragOperation enum values stay in sync with | 35 // Ensure that the WebKit::WebDragOperation enum values stay in sync with |
| 36 // NSDragOperation constants, since the code below static_casts between 'em. | 36 // NSDragOperation constants, since the code below static_casts between 'em. |
| 37 #define COMPILE_ASSERT_MATCHING_ENUM(name) \ | 37 #define COMPILE_ASSERT_MATCHING_ENUM(name) \ |
| 38 COMPILE_ASSERT(int(NS##name) == int(WebKit::Web##name), enum_mismatch_##name) | 38 COMPILE_ASSERT(int(NS##name) == int(WebKit::Web##name), enum_mismatch_##name) |
| 39 COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); | 39 COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 [[[notification userInfo] objectForKey:kSelectionDirection] | 618 [[[notification userInfo] objectForKey:kSelectionDirection] |
| 619 unsignedIntegerValue]; | 619 unsignedIntegerValue]; |
| 620 if (direction == NSDirectSelection) | 620 if (direction == NSDirectSelection) |
| 621 return; | 621 return; |
| 622 | 622 |
| 623 [self tabContents]-> | 623 [self tabContents]-> |
| 624 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 624 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
| 625 } | 625 } |
| 626 | 626 |
| 627 @end | 627 @end |
| OLD | NEW |