| OLD | NEW |
| 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/content_blocked_bubble_controller.h" | 5 #import "chrome/browser/cocoa/content_blocked_bubble_controller.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 // Resize window, autoresizing takes care of the rest. | 355 // Resize window, autoresizing takes care of the rest. |
| 356 NSSize size = NSMakeSize(requiredWidth - actualWidth, 0); | 356 NSSize size = NSMakeSize(requiredWidth - actualWidth, 0); |
| 357 size = [[[self window] contentView] convertSize:size toView:nil]; | 357 size = [[[self window] contentView] convertSize:size toView:nil]; |
| 358 NSRect frame = [[self window] frame]; | 358 NSRect frame = [[self window] frame]; |
| 359 frame.origin.x -= size.width; | 359 frame.origin.x -= size.width; |
| 360 frame.size.width += size.width; | 360 frame.size.width += size.width; |
| 361 [[self window] setFrame:frame display:NO]; | 361 [[self window] setFrame:frame display:NO]; |
| 362 } | 362 } |
| 363 | 363 |
| 364 - (void)removeInfoButton { | 364 - (void)removeInfoButton { |
| 365 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 365 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 366 switches::kDisableCookiePrompt)) { | 366 switches::kEnableCookiePrompt)) { |
| 367 // Remove info button and resize vertically. | 367 // Remove info button and resize vertically. |
| 368 int deltaY = NSHeight([infoButton_ frame]); | 368 int deltaY = NSHeight([infoButton_ frame]); |
| 369 [infoButton_ removeFromSuperview]; | 369 [infoButton_ removeFromSuperview]; |
| 370 NSRect frame = [[self window] frame]; | 370 NSRect frame = [[self window] frame]; |
| 371 frame.size.height -= deltaY; | 371 frame.size.height -= deltaY; |
| 372 [[self window] setFrame:frame display:NO]; | 372 [[self window] setFrame:frame display:NO]; |
| 373 } | 373 } |
| 374 } | 374 } |
| 375 | 375 |
| 376 - (void)awakeFromNib { | 376 - (void)awakeFromNib { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 DCHECK(i != popupLinks_.end()); | 421 DCHECK(i != popupLinks_.end()); |
| 422 contentSettingBubbleModel_->OnPopupClicked(i->second); | 422 contentSettingBubbleModel_->OnPopupClicked(i->second); |
| 423 } | 423 } |
| 424 | 424 |
| 425 - (void)clearGeolocationForCurrentHost:(id)sender { | 425 - (void)clearGeolocationForCurrentHost:(id)sender { |
| 426 contentSettingBubbleModel_->OnClearLinkClicked(); | 426 contentSettingBubbleModel_->OnClearLinkClicked(); |
| 427 [self close]; | 427 [self close]; |
| 428 } | 428 } |
| 429 | 429 |
| 430 @end // ContentBlockedBubbleController | 430 @end // ContentBlockedBubbleController |
| OLD | NEW |