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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 | 307 |
308 - (void)dealloc { | 308 - (void)dealloc { |
309 STLDeleteValues(&mediaMenus_); | 309 STLDeleteValues(&mediaMenus_); |
310 [super dealloc]; | 310 [super dealloc]; |
311 } | 311 } |
312 | 312 |
313 - (void)initializeTitle { | 313 - (void)initializeTitle { |
314 if (!titleLabel_) | 314 if (!titleLabel_) |
315 return; | 315 return; |
316 | 316 |
317 NSString* label = base::SysUTF8ToNSString( | 317 NSString* label = base::SysUTF16ToNSString( |
318 contentSettingBubbleModel_->bubble_content().title); | 318 contentSettingBubbleModel_->bubble_content().title); |
319 [titleLabel_ setStringValue:label]; | 319 [titleLabel_ setStringValue:label]; |
320 | 320 |
321 // Layout title post-localization. | 321 // Layout title post-localization. |
322 CGFloat deltaY = [GTMUILocalizerAndLayoutTweaker | 322 CGFloat deltaY = [GTMUILocalizerAndLayoutTweaker |
323 sizeToFitFixedWidthTextField:titleLabel_]; | 323 sizeToFitFixedWidthTextField:titleLabel_]; |
324 NSRect windowFrame = [[self window] frame]; | 324 NSRect windowFrame = [[self window] frame]; |
325 windowFrame.size.height += deltaY; | 325 windowFrame.size.height += deltaY; |
326 [[self window] setFrame:windowFrame display:NO]; | 326 [[self window] setFrame:windowFrame display:NO]; |
327 NSRect titleFrame = [titleLabel_ frame]; | 327 NSRect titleFrame = [titleLabel_ frame]; |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 button, base::SysUTF16ToNSString(it->second->model->GetLabelAt(index))); | 858 button, base::SysUTF16ToNSString(it->second->model->GetLabelAt(index))); |
859 | 859 |
860 it->second->model->ExecuteCommand(index, 0); | 860 it->second->model->ExecuteCommand(index, 0); |
861 } | 861 } |
862 | 862 |
863 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { | 863 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { |
864 return &mediaMenus_; | 864 return &mediaMenus_; |
865 } | 865 } |
866 | 866 |
867 @end // ContentSettingBubbleController | 867 @end // ContentSettingBubbleController |
OLD | NEW |