| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/tab_contents_view_mac.h" | 7 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 304 |
| 305 - (void)setCurrentDragOperation:(NSDragOperation)operation { | 305 - (void)setCurrentDragOperation:(NSDragOperation)operation { |
| 306 [dropTarget_ setCurrentOperation:operation]; | 306 [dropTarget_ setCurrentOperation:operation]; |
| 307 } | 307 } |
| 308 | 308 |
| 309 - (TabContents*)tabContents { | 309 - (TabContents*)tabContents { |
| 310 return tabContentsView_->tab_contents(); | 310 return tabContentsView_->tab_contents(); |
| 311 } | 311 } |
| 312 | 312 |
| 313 - (void)processKeyboardEvent:(NativeWebKeyboardEvent*)wkEvent { | 313 - (void)processKeyboardEvent:(NativeWebKeyboardEvent*)wkEvent { |
| 314 if (wkEvent->skip_in_browser) |
| 315 return; |
| 316 |
| 314 NSEvent* event = wkEvent->os_event; | 317 NSEvent* event = wkEvent->os_event; |
| 315 | 318 |
| 316 if ([event type] == NSKeyDown && ([event modifierFlags] & NSCommandKeyMask)) { | 319 if ([event type] == NSKeyDown && ([event modifierFlags] & NSCommandKeyMask)) { |
| 317 // We need to dispatch this to the menu. | 320 // We need to dispatch this to the menu. |
| 318 if ([[NSApp mainMenu] performKeyEquivalent:event]) | 321 if ([[NSApp mainMenu] performKeyEquivalent:event]) |
| 319 return; | 322 return; |
| 320 } | 323 } |
| 321 | 324 |
| 322 // Cmd-` is not in the menu and it's apparently handled by |NSApp sendEvent| | 325 // Cmd-` is not in the menu and it's apparently handled by |NSApp sendEvent| |
| 323 // if the application doesn't swallow it. We do, so we need to handle this | 326 // if the application doesn't swallow it. We do, so we need to handle this |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 } | 467 } |
| 465 | 468 |
| 466 - (BOOL)performDragOperation:(id<NSDraggingInfo>)sender { | 469 - (BOOL)performDragOperation:(id<NSDraggingInfo>)sender { |
| 467 return [dropTarget_ performDragOperation:sender view:self]; | 470 return [dropTarget_ performDragOperation:sender view:self]; |
| 468 } | 471 } |
| 469 | 472 |
| 470 // Tons of stuff goes here, where we grab events going on in Cocoaland and send | 473 // Tons of stuff goes here, where we grab events going on in Cocoaland and send |
| 471 // them into the C++ system. TODO(avi): all that jazz | 474 // them into the C++ system. TODO(avi): all that jazz |
| 472 | 475 |
| 473 @end | 476 @end |
| OLD | NEW |