| 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/ui/cocoa/content_settings_dialog_controller.h" | 5 #import "chrome/browser/ui/cocoa/content_settings_dialog_controller.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/mac_util.h" | 11 #include "base/mac/mac_util.h" |
| 12 #import "chrome/browser/content_settings/content_settings_details.h" | 12 #import "chrome/browser/content_settings/content_settings_details.h" |
| 13 #import "chrome/browser/content_settings/host_content_settings_map.h" | 13 #import "chrome/browser/content_settings/host_content_settings_map.h" |
| 14 #import "chrome/browser/geolocation/geolocation_content_settings_map.h" | 14 #import "chrome/browser/geolocation/geolocation_content_settings_map.h" |
| 15 #import "chrome/browser/geolocation/geolocation_exceptions_table_model.h" | 15 #import "chrome/browser/geolocation/geolocation_exceptions_table_model.h" |
| 16 #import "chrome/browser/notifications/desktop_notification_service.h" | 16 #import "chrome/browser/notifications/desktop_notification_service.h" |
| 17 #import "chrome/browser/notifications/notification_exceptions_table_model.h" | 17 #import "chrome/browser/notifications/notification_exceptions_table_model.h" |
| 18 #include "chrome/browser/plugin_exceptions_table_model.h" | 18 #include "chrome/browser/plugin_exceptions_table_model.h" |
| 19 #include "chrome/browser/prefs/pref_service.h" | 19 #include "chrome/browser/prefs/pref_service.h" |
| 20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
| 21 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 [g_instance selectTab:settingsType]; | 139 [g_instance selectTab:settingsType]; |
| 140 [g_instance showWindow:nil]; | 140 [g_instance showWindow:nil]; |
| 141 [g_instance closeExceptionsSheet]; | 141 [g_instance closeExceptionsSheet]; |
| 142 return g_instance; | 142 return g_instance; |
| 143 } | 143 } |
| 144 | 144 |
| 145 - (id)initWithProfile:(Profile*)profile { | 145 - (id)initWithProfile:(Profile*)profile { |
| 146 DCHECK(profile); | 146 DCHECK(profile); |
| 147 NSString* nibpath = | 147 NSString* nibpath = |
| 148 [mac_util::MainAppBundle() pathForResource:@"ContentSettings" | 148 [base::mac::MainAppBundle() pathForResource:@"ContentSettings" |
| 149 ofType:@"nib"]; | 149 ofType:@"nib"]; |
| 150 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { | 150 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { |
| 151 profile_ = profile; | 151 profile_ = profile; |
| 152 | 152 |
| 153 observer_.reset( | 153 observer_.reset( |
| 154 new ContentSettingsDialogControllerInternal::PrefObserverBridge(self)); | 154 new ContentSettingsDialogControllerInternal::PrefObserverBridge(self)); |
| 155 clearSiteDataOnExit_.Init(prefs::kClearSiteDataOnExit, | 155 clearSiteDataOnExit_.Init(prefs::kClearSiteDataOnExit, |
| 156 profile_->GetPrefs(), observer_.get()); | 156 profile_->GetPrefs(), observer_.get()); |
| 157 | 157 |
| 158 // Manually observe notifications for preferences that are grouped in | 158 // Manually observe notifications for preferences that are grouped in |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 [self didChangeValueForKey:@"notificationsSettingIndex"]; | 637 [self didChangeValueForKey:@"notificationsSettingIndex"]; |
| 638 } | 638 } |
| 639 } | 639 } |
| 640 | 640 |
| 641 - (void)contentSettingsChanged:(ContentSettingsDetails*)details { | 641 - (void)contentSettingsChanged:(ContentSettingsDetails*)details { |
| 642 [self prefChanged:prefs::kBlockNonsandboxedPlugins]; | 642 [self prefChanged:prefs::kBlockNonsandboxedPlugins]; |
| 643 [self prefChanged:prefs::kDefaultContentSettings]; | 643 [self prefChanged:prefs::kDefaultContentSettings]; |
| 644 } | 644 } |
| 645 | 645 |
| 646 @end | 646 @end |
| OLD | NEW |