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

Side by Side Diff: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm

Issue 777103002: Add the names of plugins to the blocked plugin bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more nit Created 6 years 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 (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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 if (NSWidth(buttonFrame) > maxWidth) 376 if (NSWidth(buttonFrame) > maxWidth)
377 buttonFrame.size.width = maxWidth; 377 buttonFrame.size.width = maxWidth;
378 378
379 [button setFrame:buttonFrame]; 379 [button setFrame:buttonFrame];
380 [button setTarget:self]; 380 [button setTarget:self];
381 [button setAction:@selector(popupLinkClicked:)]; 381 [button setAction:@selector(popupLinkClicked:)];
382 return button; 382 return button;
383 } 383 }
384 384
385 - (void)initializeBlockedPluginsList { 385 - (void)initializeBlockedPluginsList {
386 int delta = NSMinY([titleLabel_ frame]) - 386 NSString* label = base::SysUTF16ToNSString(
387 NSMinY([blockedResourcesField_ frame]); 387 contentSettingBubbleModel_->bubble_content().plugin_names);
388 [blockedResourcesField_ removeFromSuperview]; 388 [blockedResourcesField_ setStringValue:label];
389 NSRect frame = [[self window] frame];
390 frame.size.height -= delta;
391 [[self window] setFrame:frame display:NO];
392 } 389 }
393 390
394 - (void)initializePopupList { 391 - (void)initializePopupList {
395 // I didn't put the buttons into a NSMatrix because then they are only one 392 // I didn't put the buttons into a NSMatrix because then they are only one
396 // entity in the key view loop. This way, one can tab through all of them. 393 // entity in the key view loop. This way, one can tab through all of them.
397 const ContentSettingBubbleModel::PopupItems& popupItems = 394 const ContentSettingBubbleModel::PopupItems& popupItems =
398 contentSettingBubbleModel_->bubble_content().popup_items; 395 contentSettingBubbleModel_->bubble_content().popup_items;
399 396
400 // Get the pre-resize frame of the radio group. Its origin is where the 397 // Get the pre-resize frame of the radio group. Its origin is where the
401 // popup list should go. 398 // popup list should go.
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 button, base::SysUTF16ToNSString(it->second->model->GetLabelAt(index))); 815 button, base::SysUTF16ToNSString(it->second->model->GetLabelAt(index)));
819 816
820 it->second->model->ExecuteCommand(index, 0); 817 it->second->model->ExecuteCommand(index, 0);
821 } 818 }
822 819
823 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { 820 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus {
824 return &mediaMenus_; 821 return &mediaMenus_;
825 } 822 }
826 823
827 @end // ContentSettingBubbleController 824 @end // ContentSettingBubbleController
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698