Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: chrome/browser/tab_contents/tab_contents_view_mac.mm

Issue 8586056: Fix top crash due to r110394 - TabContentsViewCocoa renderWidgetHostWasResized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698