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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings_bubble_controller.mm

Issue 11571010: fixed the DCHECK and also corrected the website setting UI for media (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed Markus' comment and consolidated |web_content_|. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/website_settings/permission_selector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/website_settings_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/website_settings_bubble_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #import <AppKit/AppKit.h> 9 #import <AppKit/AppKit.h>
10 10
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 [button setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; 865 [button setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
866 [button setBordered:NO]; 866 [button setBordered:NO];
867 [[button cell] setControlSize:NSSmallControlSize]; 867 [[button cell] setControlSize:NSSmallControlSize];
868 [button setTag:permissionInfo.type]; 868 [button setTag:permissionInfo.type];
869 [button setAction:@selector(permissionValueChanged:)]; 869 [button setAction:@selector(permissionValueChanged:)];
870 [button setTarget:self]; 870 [button setTarget:self];
871 871
872 // Create the popup menu. 872 // Create the popup menu.
873 // TODO(dubroy): Refactor this code to use PermissionMenuModel. 873 // TODO(dubroy): Refactor this code to use PermissionMenuModel.
874 874
875 // Media stream permission does not support "Always allow". 875 // Media stream permission only support "Always allow" for https.
876 // TODO(xians): Media supports "allow" for https but not for http. 876 if (permissionInfo.type != CONTENT_SETTINGS_TYPE_MEDIASTREAM ||
877 if (permissionInfo.type != CONTENT_SETTINGS_TYPE_MEDIASTREAM) { 877 (webContents_ && webContents_->GetURL().SchemeIsSecure())) {
878 [button addItemWithTitle: 878 [button addItemWithTitle:
879 l10n_util::GetNSString(IDS_WEBSITE_SETTINGS_MENU_ITEM_ALLOW)]; 879 l10n_util::GetNSString(IDS_WEBSITE_SETTINGS_MENU_ITEM_ALLOW)];
880 [[button lastItem] setTag:CONTENT_SETTING_ALLOW]; 880 [[button lastItem] setTag:CONTENT_SETTING_ALLOW];
881 } 881 }
882 882
883 // Fullscreen does not support "Always block". 883 // Fullscreen does not support "Always block".
884 if (permissionInfo.type != CONTENT_SETTINGS_TYPE_FULLSCREEN) { 884 if (permissionInfo.type != CONTENT_SETTINGS_TYPE_FULLSCREEN) {
885 [button addItemWithTitle: 885 [button addItemWithTitle:
886 l10n_util::GetNSString(IDS_WEBSITE_SETTINGS_MENU_ITEM_BLOCK)]; 886 l10n_util::GetNSString(IDS_WEBSITE_SETTINGS_MENU_ITEM_BLOCK)];
887 [[button lastItem] setTag:CONTENT_SETTING_BLOCK]; 887 [[button lastItem] setTag:CONTENT_SETTING_BLOCK];
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 [bubble_controller_ setPermissionInfo:permission_info_list]; 1232 [bubble_controller_ setPermissionInfo:permission_info_list];
1233 } 1233 }
1234 1234
1235 void WebsiteSettingsUIBridge::SetFirstVisit(const string16& first_visit) { 1235 void WebsiteSettingsUIBridge::SetFirstVisit(const string16& first_visit) {
1236 [bubble_controller_ setFirstVisit:first_visit]; 1236 [bubble_controller_ setFirstVisit:first_visit];
1237 } 1237 }
1238 1238
1239 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { 1239 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) {
1240 [bubble_controller_ setSelectedTab:tab_id]; 1240 [bubble_controller_ setSelectedTab:tab_id];
1241 } 1241 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/website_settings/permission_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698