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

Side by Side Diff: chrome/browser/cocoa/browser_window_controller.mm

Issue 151107: Mac valgrind fix (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months 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 | tools/valgrind/suppressions_mac.txt » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include <Carbon/Carbon.h> 5 #include <Carbon/Carbon.h>
6 6
7 #include "base/mac_util.h" 7 #include "base/mac_util.h"
8 #include "base/scoped_nsdisable_screen_updates.h" 8 #include "base/scoped_nsdisable_screen_updates.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/app/chrome_dll_resource.h" // IDC_* 10 #include "chrome/app/chrome_dll_resource.h" // IDC_*
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 // Show one window, hide the other. 650 // Show one window, hide the other.
651 [fullscreen_window_ makeKeyAndOrderFront:self]; 651 [fullscreen_window_ makeKeyAndOrderFront:self];
652 [content setNeedsDisplay:YES]; 652 [content setNeedsDisplay:YES];
653 [window_ orderOut:self]; 653 [window_ orderOut:self];
654 } else { 654 } else {
655 [self adjustUIForFullscreen:fullscreen]; 655 [self adjustUIForFullscreen:fullscreen];
656 NSView* content = [fullscreen_window_ contentView]; 656 NSView* content = [fullscreen_window_ contentView];
657 [content removeFromSuperview]; 657 [content removeFromSuperview];
658 [window_ setContentView:content]; 658 [window_ setContentView:content];
659 [self setWindow:window_.get()]; 659 [self setWindow:window_.get()];
660 [content setNeedsDisplay:YES];
661
662 // With this call, valgrind yells at me about "Conditional jump or
663 // move depends on uninitialised value(s)". The error happens in
664 // -[NSThemeFrame drawOverlayRect:]. I'm pretty convinced this is
665 // an Apple bug, but there is no visual impact. I have been
666 // unable to tickle it away with other window or view manipulation
667 // Cocoa calls. Stack added to suppressions_mac.txt.
660 [window_ makeKeyAndOrderFront:self]; 668 [window_ makeKeyAndOrderFront:self];
661 [content setNeedsDisplay:YES]; 669
662 [fullscreen_window_ close]; 670 [fullscreen_window_ close];
663 fullscreen_window_.reset(nil); 671 fullscreen_window_.reset(nil);
664 } 672 }
665 } 673 }
666 674
667 - (BOOL)isFullscreen { 675 - (BOOL)isFullscreen {
668 return fullscreen_; 676 return fullscreen_;
669 } 677 }
670 678
671 // Called by the bookmark bar to open a URL. 679 // Called by the bookmark bar to open a URL.
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 browser_->ExecuteCommand(command); 893 browser_->ExecuteCommand(command);
886 } 894 }
887 895
888 - (id)windowWillReturnFieldEditor:(NSWindow*)sender toObject:(id)obj { 896 - (id)windowWillReturnFieldEditor:(NSWindow*)sender toObject:(id)obj {
889 // Ask the toolbar controller if it wants to return a custom field editor 897 // Ask the toolbar controller if it wants to return a custom field editor
890 // for the specific object. 898 // for the specific object.
891 return [toolbarController_ customFieldEditorForObject:obj]; 899 return [toolbarController_ customFieldEditorForObject:obj];
892 } 900 }
893 901
894 @end 902 @end
OLDNEW
« no previous file with comments | « no previous file | tools/valgrind/suppressions_mac.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698