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

Side by Side Diff: chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm

Issue 7633034: Use Titlebar instead of TitleBar consistently in panels code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review feedback. Created 9 years, 4 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 | « chrome/browser/ui/panels/panel_titlebar_view_cocoa.h ('k') | 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 "chrome/browser/ui/panels/panel_titlebar_view_cocoa.h" 5 #import "chrome/browser/ui/panels/panel_titlebar_view_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "chrome/browser/ui/cocoa/tracking_area.h" 10 #import "chrome/browser/ui/cocoa/tracking_area.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // contentView titlebar 70 // contentView titlebar
71 NSRect rootViewBounds = [[self superview] bounds]; 71 NSRect rootViewBounds = [[self superview] bounds];
72 NSRect contentFrame = [[[controller_ window] contentView] frame]; 72 NSRect contentFrame = [[[controller_ window] contentView] frame];
73 NSRect titlebarFrame = 73 NSRect titlebarFrame =
74 NSMakeRect(NSMinX(contentFrame), 74 NSMakeRect(NSMinX(contentFrame),
75 NSMaxY(contentFrame), 75 NSMaxY(contentFrame),
76 NSWidth(contentFrame), 76 NSWidth(contentFrame),
77 NSMaxY(rootViewBounds) - NSMaxY(contentFrame)); 77 NSMaxY(rootViewBounds) - NSMaxY(contentFrame));
78 [self setFrame:titlebarFrame]; 78 [self setFrame:titlebarFrame];
79 79
80 // Update layout of controls in the title bar. 80 // Update layout of controls in the titlebar.
81 [self updateCloseButtonLayout]; 81 [self updateCloseButtonLayout];
82 82
83 // Set autoresizing behavior: glued to edges on left, top and right. 83 // Set autoresizing behavior: glued to edges on left, top and right.
84 [self setAutoresizingMask:(NSViewMinYMargin | NSViewWidthSizable)]; 84 [self setAutoresizingMask:(NSViewMinYMargin | NSViewWidthSizable)];
85 } 85 }
86 86
87 - (void)updateCloseButtonLayout { 87 - (void)updateCloseButtonLayout {
88 NSRect buttonBounds = [closeButton_ bounds]; 88 NSRect buttonBounds = [closeButton_ bounds];
89 NSRect bounds = [self bounds]; 89 NSRect bounds = [self bounds];
90 90
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 return controller_; 125 return controller_;
126 } 126 }
127 127
128 // (Private/TestingAPI) 128 // (Private/TestingAPI)
129 - (void)simulateCloseButtonClick { 129 - (void)simulateCloseButtonClick {
130 [[closeButton_ cell] performClick:closeButton_]; 130 [[closeButton_ cell] performClick:closeButton_];
131 } 131 }
132 132
133 @end 133 @end
134 134
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_titlebar_view_cocoa.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698