OLD | NEW |
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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 // Create an empty window into which content is placed. | 335 // Create an empty window into which content is placed. |
336 base::scoped_nsobject<InfoBubbleWindow> window( | 336 base::scoped_nsobject<InfoBubbleWindow> window( |
337 [[InfoBubbleWindow alloc] initWithContentRect:contentRect | 337 [[InfoBubbleWindow alloc] initWithContentRect:contentRect |
338 styleMask:NSBorderlessWindowMask | 338 styleMask:NSBorderlessWindowMask |
339 backing:NSBackingStoreBuffered | 339 backing:NSBackingStoreBuffered |
340 defer:NO]); | 340 defer:NO]); |
341 | 341 |
342 if ((self = [super initWithWindow:window.get() | 342 if ((self = [super initWithWindow:window.get() |
343 parentWindow:parentWindow | 343 parentWindow:parentWindow |
344 anchoredAt:NSZeroPoint])) { | 344 anchoredAt:NSZeroPoint])) { |
345 [[self bubble] setArrowLocation:info_bubble::kTopLeft]; | 345 [[self bubble] setArrowLocation:views::BubbleBorder::TOP_LEFT]; |
346 | 346 |
347 // Create the container view that uses flipped coordinates. | 347 // Create the container view that uses flipped coordinates. |
348 NSRect contentFrame = NSMakeRect(0, 0, [self defaultWindowWidth], 300); | 348 NSRect contentFrame = NSMakeRect(0, 0, [self defaultWindowWidth], 300); |
349 contentView_.reset( | 349 contentView_.reset( |
350 [[FlippedView alloc] initWithFrame:contentFrame]); | 350 [[FlippedView alloc] initWithFrame:contentFrame]); |
351 | 351 |
352 // Replace the window's content. | 352 // Replace the window's content. |
353 [[[self window] contentView] setSubviews: | 353 [[[self window] contentView] setSubviews: |
354 [NSArray arrayWithObject:contentView_.get()]]; | 354 [NSArray arrayWithObject:contentView_.get()]]; |
355 | 355 |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 [bubble_controller_ setPermissionInfo:permission_info_list]; | 1288 [bubble_controller_ setPermissionInfo:permission_info_list]; |
1289 } | 1289 } |
1290 | 1290 |
1291 void WebsiteSettingsUIBridge::SetFirstVisit(const base::string16& first_visit) { | 1291 void WebsiteSettingsUIBridge::SetFirstVisit(const base::string16& first_visit) { |
1292 [bubble_controller_ setFirstVisit:first_visit]; | 1292 [bubble_controller_ setFirstVisit:first_visit]; |
1293 } | 1293 } |
1294 | 1294 |
1295 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { | 1295 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { |
1296 [bubble_controller_ setSelectedTab:tab_id]; | 1296 [bubble_controller_ setSelectedTab:tab_id]; |
1297 } | 1297 } |
OLD | NEW |