| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 | 512 |
| 513 - (void)setFrameWithDeferredUpdate:(NSRect)frameRect { | 513 - (void)setFrameWithDeferredUpdate:(NSRect)frameRect { |
| 514 [super setFrame:frameRect]; | 514 [super setFrame:frameRect]; |
| 515 [self performSelector:@selector(renderWidgetHostWasResized) | 515 [self performSelector:@selector(renderWidgetHostWasResized) |
| 516 withObject:nil | 516 withObject:nil |
| 517 afterDelay:0]; | 517 afterDelay:0]; |
| 518 } | 518 } |
| 519 | 519 |
| 520 - (void)renderWidgetHostWasResized { | 520 - (void)renderWidgetHostWasResized { |
| 521 TabContents* tabContents = [self tabContents]; | 521 TabContents* tabContents = [self tabContents]; |
| 522 if (tabContents->render_view_host()) | 522 if (tabContents && tabContents->render_view_host()) |
| 523 tabContents->render_view_host()->WasResized(); | 523 tabContents->render_view_host()->WasResized(); |
| 524 } | 524 } |
| 525 | 525 |
| 526 // NSDraggingSource methods | 526 // NSDraggingSource methods |
| 527 | 527 |
| 528 // Returns what kind of drag operations are available. This is a required | 528 // Returns what kind of drag operations are available. This is a required |
| 529 // method for NSDraggingSource. | 529 // method for NSDraggingSource. |
| 530 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal { | 530 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal { |
| 531 if (dragSource_.get()) | 531 if (dragSource_.get()) |
| 532 return [dragSource_ draggingSourceOperationMaskForLocal:isLocal]; | 532 return [dragSource_ draggingSourceOperationMaskForLocal:isLocal]; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 [[[notification userInfo] objectForKey:kSelectionDirection] | 606 [[[notification userInfo] objectForKey:kSelectionDirection] |
| 607 unsignedIntegerValue]; | 607 unsignedIntegerValue]; |
| 608 if (direction == NSDirectSelection) | 608 if (direction == NSDirectSelection) |
| 609 return; | 609 return; |
| 610 | 610 |
| 611 [self tabContents]-> | 611 [self tabContents]-> |
| 612 FocusThroughTabTraversal(direction == NSSelectingPrevious); | 612 FocusThroughTabTraversal(direction == NSSelectingPrevious); |
| 613 } | 613 } |
| 614 | 614 |
| 615 @end | 615 @end |
| OLD | NEW |