| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/content_settings/content_setting_bubble_cocoa.h
" | 5 #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 size = [[[self window] contentView] convertSize:size toView:nil]; | 732 size = [[[self window] contentView] convertSize:size toView:nil]; |
| 733 NSRect frame = [[self window] frame]; | 733 NSRect frame = [[self window] frame]; |
| 734 frame.origin.x -= size.width; | 734 frame.origin.x -= size.width; |
| 735 frame.size.width += size.width; | 735 frame.size.width += size.width; |
| 736 [[self window] setFrame:frame display:NO]; | 736 [[self window] setFrame:frame display:NO]; |
| 737 } | 737 } |
| 738 | 738 |
| 739 - (void)awakeFromNib { | 739 - (void)awakeFromNib { |
| 740 [super awakeFromNib]; | 740 [super awakeFromNib]; |
| 741 | 741 |
| 742 [[self bubble] setArrowLocation:info_bubble::kTopRight]; | 742 [[self bubble] setArrowLocation:views::BubbleBorder::TOP_RIGHT]; |
| 743 | 743 |
| 744 // Adapt window size to bottom buttons. Do this before all other layouting. | 744 // Adapt window size to bottom buttons. Do this before all other layouting. |
| 745 [self initManageDoneButtons]; | 745 [self initManageDoneButtons]; |
| 746 | 746 |
| 747 [self initializeTitle]; | 747 [self initializeTitle]; |
| 748 | 748 |
| 749 ContentSettingsType type = contentSettingBubbleModel_->content_type(); | 749 ContentSettingsType type = contentSettingBubbleModel_->content_type(); |
| 750 if (type == CONTENT_SETTINGS_TYPE_PLUGINS) { | 750 if (type == CONTENT_SETTINGS_TYPE_PLUGINS) { |
| 751 [self sizeToFitLoadButton]; | 751 [self sizeToFitLoadButton]; |
| 752 [self initializeBlockedPluginsList]; | 752 [self initializeBlockedPluginsList]; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 button, base::SysUTF16ToNSString(it->second->model->GetLabelAt(index))); | 824 button, base::SysUTF16ToNSString(it->second->model->GetLabelAt(index))); |
| 825 | 825 |
| 826 it->second->model->ExecuteCommand(index, 0); | 826 it->second->model->ExecuteCommand(index, 0); |
| 827 } | 827 } |
| 828 | 828 |
| 829 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { | 829 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { |
| 830 return &mediaMenus_; | 830 return &mediaMenus_; |
| 831 } | 831 } |
| 832 | 832 |
| 833 @end // ContentSettingBubbleController | 833 @end // ContentSettingBubbleController |
| OLD | NEW |