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

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

Issue 2717603003: [Mac] Make bubble arrow location/position RTL-aware (Closed)
Patch Set: Created 3 years, 10 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
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 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // Create an empty window into which content is placed. 206 // Create an empty window into which content is placed.
207 base::scoped_nsobject<InfoBubbleWindow> window( 207 base::scoped_nsobject<InfoBubbleWindow> window(
208 [[InfoBubbleWindow alloc] initWithContentRect:contentRect 208 [[InfoBubbleWindow alloc] initWithContentRect:contentRect
209 styleMask:NSBorderlessWindowMask 209 styleMask:NSBorderlessWindowMask
210 backing:NSBackingStoreBuffered 210 backing:NSBackingStoreBuffered
211 defer:NO]); 211 defer:NO]);
212 212
213 if ((self = [super initWithWindow:window.get() 213 if ((self = [super initWithWindow:window.get()
214 parentWindow:parentWindow 214 parentWindow:parentWindow
215 anchoredAt:NSZeroPoint])) { 215 anchoredAt:NSZeroPoint])) {
216 [[self bubble] setArrowLocation:info_bubble::kTopLeft]; 216 [[self bubble] setArrowLocation:info_bubble::kTopLeading];
217 217
218 // Create the container view that uses flipped coordinates. 218 // Create the container view that uses flipped coordinates.
219 NSRect contentFrame = NSMakeRect(0, 0, [self defaultWindowWidth], 300); 219 NSRect contentFrame = NSMakeRect(0, 0, [self defaultWindowWidth], 300);
220 contentView_.reset( 220 contentView_.reset(
221 [[FlippedView alloc] initWithFrame:contentFrame]); 221 [[FlippedView alloc] initWithFrame:contentFrame]);
222 222
223 // Replace the window's content. 223 // Replace the window's content.
224 [[[self window] contentView] setSubviews: 224 [[[self window] contentView] setSubviews:
225 [NSArray arrayWithObject:contentView_.get()]]; 225 [NSArray arrayWithObject:contentView_.get()]];
226 226
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 const CookieInfoList& cookie_info_list) { 1209 const CookieInfoList& cookie_info_list) {
1210 [bubble_controller_ setCookieInfo:cookie_info_list]; 1210 [bubble_controller_ setCookieInfo:cookie_info_list];
1211 } 1211 }
1212 1212
1213 void WebsiteSettingsUIBridge::SetPermissionInfo( 1213 void WebsiteSettingsUIBridge::SetPermissionInfo(
1214 const PermissionInfoList& permission_info_list, 1214 const PermissionInfoList& permission_info_list,
1215 ChosenObjectInfoList chosen_object_info_list) { 1215 ChosenObjectInfoList chosen_object_info_list) {
1216 [bubble_controller_ setPermissionInfo:permission_info_list 1216 [bubble_controller_ setPermissionInfo:permission_info_list
1217 andChosenObjects:std::move(chosen_object_info_list)]; 1217 andChosenObjects:std::move(chosen_object_info_list)];
1218 } 1218 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698