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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm

Issue 323143004: [Mac] Misc fixes for the new avatar bubble (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unbork rebase and fix unittest Created 6 years, 6 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/cocoa/profiles/profile_chooser_controller_unittest.mm ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/cocoa/website_settings/website_settings_bubble_contro ller.h" 5 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro ller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #import <AppKit/AppKit.h> 9 #import <AppKit/AppKit.h>
10 10
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 [view addSubview:imageView.get()]; 801 [view addSubview:imageView.get()];
802 return imageView.get(); 802 return imageView.get();
803 } 803 }
804 804
805 // Add a separator as a subview of the given view. Return the new view. 805 // Add a separator as a subview of the given view. Return the new view.
806 - (NSView*)addSeparatorToView:(NSView*)view { 806 - (NSView*)addSeparatorToView:(NSView*)view {
807 // Take up almost the full width of the container's frame. 807 // Take up almost the full width of the container's frame.
808 CGFloat width = NSWidth([view frame]) - 2 * kFramePadding; 808 CGFloat width = NSWidth([view frame]) - 2 * kFramePadding;
809 809
810 // Use an arbitrary position; it will be adjusted in performLayout. 810 // Use an arbitrary position; it will be adjusted in performLayout.
811 NSBox* spacer = 811 NSBox* spacer = [self horizontalSeparatorWithFrame:NSMakeRect(
812 [self separatorWithFrame:NSMakeRect(kFramePadding, 0, width, 0)]; 812 kFramePadding, 0, width, 0)];
813 [view addSubview:spacer]; 813 [view addSubview:spacer];
814 return spacer; 814 return spacer;
815 } 815 }
816 816
817 // Add a link button with the given text to |view|. 817 // Add a link button with the given text to |view|.
818 - (NSButton*)addLinkButtonWithText:(NSString*)text toView:(NSView*)view { 818 - (NSButton*)addLinkButtonWithText:(NSString*)text toView:(NSView*)view {
819 // Frame size is arbitrary; it will be adjusted by the layout tweaker. 819 // Frame size is arbitrary; it will be adjusted by the layout tweaker.
820 NSRect frame = NSMakeRect(kFramePadding, 0, 100, 10); 820 NSRect frame = NSMakeRect(kFramePadding, 0, 100, 10);
821 base::scoped_nsobject<NSButton> button( 821 base::scoped_nsobject<NSButton> button(
822 [[NSButton alloc] initWithFrame:frame]); 822 [[NSButton alloc] initWithFrame:frame]);
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 [bubble_controller_ setPermissionInfo:permission_info_list]; 1157 [bubble_controller_ setPermissionInfo:permission_info_list];
1158 } 1158 }
1159 1159
1160 void WebsiteSettingsUIBridge::SetFirstVisit(const base::string16& first_visit) { 1160 void WebsiteSettingsUIBridge::SetFirstVisit(const base::string16& first_visit) {
1161 [bubble_controller_ setFirstVisit:first_visit]; 1161 [bubble_controller_ setFirstVisit:first_visit];
1162 } 1162 }
1163 1163
1164 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { 1164 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) {
1165 [bubble_controller_ setSelectedTab:tab_id]; 1165 [bubble_controller_ setSelectedTab:tab_id];
1166 } 1166 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698