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

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

Issue 3006002: Fix uninitialized memory error caused by r50606. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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/memcheck/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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/cocoa/tab_window_controller.h" 5 #import "chrome/browser/cocoa/tab_window_controller.h"
6 6
7 #include "app/theme_provider.h" 7 #include "app/theme_provider.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #import "chrome/browser/cocoa/tab_strip_view.h" 9 #import "chrome/browser/cocoa/tab_strip_view.h"
10 #import "chrome/browser/cocoa/themed_window.h" 10 #import "chrome/browser/cocoa/themed_window.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 NSWidth([sideTabStripView_ frame]), 58 NSWidth([sideTabStripView_ frame]),
59 NSHeight(contentFrame)); 59 NSHeight(contentFrame));
60 [sideTabStripView_ setFrame:sideStripFrame]; 60 [sideTabStripView_ setFrame:sideStripFrame];
61 [contentView addSubview:sideTabStripView_]; 61 [contentView addSubview:sideTabStripView_];
62 } 62 }
63 63
64 // Add the top tab strop to the window, above the content box and add it to the 64 // Add the top tab strop to the window, above the content box and add it to the
65 // view hierarchy as a sibling of the content view so it can overlap with the 65 // view hierarchy as a sibling of the content view so it can overlap with the
66 // window frame. 66 // window frame.
67 - (void)addTopTabStripToWindow { 67 - (void)addTopTabStripToWindow {
68 NSRect contentFrame = [tabContentArea_ frame];
68 NSRect tabFrame = 69 NSRect tabFrame =
69 NSMakeRect(0, NSMaxY(tabFrame), 70 NSMakeRect(0, NSMaxY(contentFrame),
viettrungluu 2010/07/15 17:55:34 I feel like the compiler should have noticed somet
70 NSWidth([tabContentArea_ frame]), 71 NSWidth(contentFrame),
71 NSHeight([topTabStripView_ frame])); 72 NSHeight([topTabStripView_ frame]));
72 [topTabStripView_ setFrame:tabFrame]; 73 [topTabStripView_ setFrame:tabFrame];
73 NSView* contentParent = [[[self window] contentView] superview]; 74 NSView* contentParent = [[[self window] contentView] superview];
74 [contentParent addSubview:topTabStripView_]; 75 [contentParent addSubview:topTabStripView_];
75 } 76 }
76 77
77 - (void)windowDidLoad { 78 - (void)windowDidLoad {
78 // Cache the difference in height between the window content area and the 79 // Cache the difference in height between the window content area and the
79 // tab content area. 80 // tab content area.
80 NSRect tabFrame = [tabContentArea_ frame]; 81 NSRect tabFrame = [tabContentArea_ frame];
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 closeDeferred_ = YES; 333 closeDeferred_ = YES;
333 } 334 }
334 335
335 // Called when the size of the window content area has changed. Override to 336 // Called when the size of the window content area has changed. Override to
336 // position specific views. Base class implementation does nothing. 337 // position specific views. Base class implementation does nothing.
337 - (void)layoutSubviews { 338 - (void)layoutSubviews {
338 NOTIMPLEMENTED(); 339 NOTIMPLEMENTED();
339 } 340 }
340 341
341 @end 342 @end
OLDNEW
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions_mac.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698